Tableau Column Difference - as a dimension
I have got two types of values - 'Base' and 'CSA' in my data and I want to find the difference of those two values. Sounds simple right? Can you show that in Tableau? Think again. Yes you can!
Problem:
Googling gave me the solution to look for difference between columns and I got the difference but that was in a separate column. I wanted that in a row. Well, that essentially meant, I had to add a value in the dimension 'Valuation Profile'. How to do that? Asked this question on the tableau community and got my answer. Here is the original post.
Solution:
Problem:
Googling gave me the solution to look for difference between columns and I got the difference but that was in a separate column. I wanted that in a row. Well, that essentially meant, I had to add a value in the dimension 'Valuation Profile'. How to do that? Asked this question on the tableau community and got my answer. Here is the original post.
Solution:
Use LOD expression to calculate the individual values first. Create calculated fields 'BASE', 'CSA' and 'CSA-BASE' as below.
BASE:
{FIXED [Book Name]: SUM( if [Valuation Profile] = 'BASE' then Value else 0 end ) }
CSA:
{FIXED [Book Name]: SUM( if [Valuation Profile] = 'CSA' then Value else 0 end ) }
CSA-BASE
[CSA]-[BASE]
Comments
Post a Comment