You would create the fields separately - i.e.
7+5: IF [version] = '7+5' THEN [Values] END
2016AOP: IF [version] = '2016 AOP' THEN [Values] END
The difference can then be calculated using those new fields - for example you could have SUM([7+5]) / SUM([2016AOP]) - 1
make a calculated field like?
str(int(LEFT([7+5], FIND([7+5], ","))) - int(LEFT([2016 AOP], FIND([2016 AOP], ",")))) + "," + str(int(MID([7+5], FIND([7+5], ",")+1)) - int(MID([2016 AOP], FIND([2016 AOP], ",")+1)))
Corey, thank you for looking into this. I tried creating a calculated field like that however I did not manage to make it work at all. Something is wrong in that formula plus I don’t want to simply get a solution I would like to understand how to solve it on my own.
Andrew, thanks for looking into that. I tried what you wrote and it works only partially. It does give me an option to create columns with values depending on however I encounter two problems:
1. Tableau still needs to have something as a “mark” to show values. With your approach I get LOBs and next column is values for 7+5 and another is blank with “abc” showing. I end up with the same problem when I change my source data to have different versions as columns.
2. I added different versions as different calculations and was able to come up with a difference between them however when I tried putting them the way I want (75, AOP, vs AOP, 2015, vs 2015, 66, vs 6+6) the table started to merge same columns and did not show properly. On top of that problem number 1 was still there – Tableau expected me to put something as a “mark”.
My issue is still not resolved, unfortunately. It should be very simple but drives me crazy the amount of time I spent on this.
Michal, if you reply from your inbox your email signature is included...
Yeah, I noticed that. Didn't see a reply button and had to reply via email. Turns out I wasn't logged.
can confirm the thread is clear... you're not the only one, just thought i would warn you