Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a Crosstab showing Sales nesting 2021 and 2022 columns. I would like to create a third column representing the difference between 2021 and 2022 Sales. How do I do this?
AP
if you always compare the current year with the previous year you can change sum(sales) to have two measures
=Sum({$<Year={$(=max(Year)-1)} Sales) ---> for 2021
=Sum({$<Year={$(=max(Year))} Sales) ----> for 2022
and then add measure difference
=Sum({$<Year={$(=max(Year))} Sales)-Sum({$<Year={$(=max(Year)-1)} Sales)