Hey All,
Kind of new to Tableau so sorry for the newbie question : )
B and A being two different URLs, I'm trying to define a Conversion Rate From A to B as a Metric through the calculated field feature.
I managed to calculate this Conversion Rate already through the "Table Calculation" feature, but I would like to have this Metric in my "Measures" tab to be able to use it in a more flexible way.
My data set looks like this:
Date | Marketing Type | Device type | Funnel step | Number of Visits |
01-Jul-14 | xxx | ppp | aaa | 1150 |
01-Jul-14 | yyy | mmm | bbb | 120 |
01-Jul-14 | zzz | nnn | ccc | 16 |
My approach was to first define Conversions as Metrics, through the "Calculated Field" feature, following this formula:
Conversions to aaa = IF [Funnel step] = "aaa" THEN [Number of Visits] END
Conversions to bbb= IF [Funnel step] = "bbb" THEN [Number of Visits] END
Which plainly worked.
Then I tried something like:
Conversion Rate From aaa to bbb = Conversions to bbb / Conversions to aaa
Which does not work at all - always NULL, as I guess, ([Funnel step] = "aaa" and [Funnel step] = "bbb") is never TRUE....
I guess I need to use some aggregation function here, but I don't know how to.
Any idea someone ?
Many thanks
Sabrina
Hi Sabrina,
Looks like you may just need to be wrapping your measure into Sum() functions so:
Conversions to aaa = IF [Funnel step] = "aaa" THEN [Number of Visits] END
Becomes
Conversions to aaa = IF [Funnel step] = "aaa" THEN Sum([Number of Visits]) END
Please can you upload your workbook so we can see where you are at so far.
nb For the future, always try to upload a packaged workbook (.twbx) file pref using Superstore Sales then we get on it a lot quicker.
Steve
Become a Viz Whiz on the Forums!
Support the Community and master Tableau.