Hi Nerea, you can use either sets or the FIXED LOD calcs to find this.
Here I am showing the two FIXED formulas which are used in the final CTR calculation. It isn't necessary to break these out into separate calculations - you can put all these calculations in one single field.
The FIXED calcs are in blue, the Sets are in purple. You can see they give the same result.
When you use FIXED calculations and sets, any filters you want to apply to these calculations need to be Added to Context in order to have the right effect.
Hope this helps,
CTR.twbx 29.0 KB
Thanks @Jennifer! This is awesome. Just for my understanding, why does the MAX expression return a boolean in this case ? This is exactly what I was looking for but I wouldn´t have found the right answer without your help as Tableau describes the MAX function as "returns the maximum of a single expression" so I was automatically associating it to numerical values.
Adding the screenshot of the calculated field in case it serves as reference to other people, thanks again!
1 of 1 people found this helpful
Hi Nerea, glad it helped!
The inside of the max expression is a boolean expression - "[Page] = 'mainpage'" will return True or False on each record. The max of a boolean field - max(True,False) - returns True.
Here's a breakout of the intermediate formulas. Does it make sense?
1. Finds True/False for each session id whether that session has 'mainpage' at all, or 'step1' at all.
2. Checks if [Sess has MP] and [Sess has Step1] are both true
Yes, that is great! So simple when you see it !