Hi, everyone!
I'm trying do add a column with a simple calculation on my crosstab, but I haven't find a way to do it.
I want to make a percentual variance between the two periods I'm comparing (2020 vs. 2019). It should be like this:
I don't know if this changes anything, but I've selected the option to show the headers of the measures on the rows.
Is there a way to do it on the crosstab? Or i should use another type of object?
Thanks!
Hello @Renan_Crepaldi ,
With the data structure you have, personally I don't think it's doable with any out-of-the-box chart or custom build graph. The way I see it, you have two options to achieve this:
Best regards,
Petri
Hello @Renan_Crepaldi ,
Yes, you can do this in Crosstab. You just need to use aggregated measure:
( Sum [_ByGroup_] ('Y2020'n) / Sum [_ByGroup_] ('Y2019'n) ) - 1
And here is how it looks like plus the source data I used:
I hope this helps,
Br,
Petri
Hello, @PetriRoine! Thanks for replying.
The problem is that my data doesn't have the KPIs separated by year. I needed to use the crosstab to split each KPI by putting the year on the column.
I've attached a sample to make it easier to understand (should've done this before, sorry).
If you need anymore information, please, let me know.
BR, Renan
Hello @Renan_Crepaldi ,
With the data structure you have, personally I don't think it's doable with any out-of-the-box chart or custom build graph. The way I see it, you have two options to achieve this:
Best regards,
Petri
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.
Find more tutorials on the SAS Users YouTube channel.