Forum Discussion
Variance between current year and last year in columns
- 2 years ago
There probably is a way to do that. However, typically, the "Sales Amt" is calculated per a category of sorts. For example, "Sales Amt", per salesperson; store; region; or even date. Does that make sense? If you truly just want "Sales Amt", you could probably do something along the lines of:
ADDCOLUMNS ( SUMMARIZE ( SalesTable, [CY], [LY], [Variance] ), "Sales Amt", "Sales Amt" )I would need a better understanding of the data to build that DAX for you.
Lastly, if my response was helpful, marking it as a solution would be greatly appreciatedðŸ¤
hi ExcelMonke
Thats how I want to show the result but I haven't been able to.
I can split the columns by the year to get the last year and current year, but how do I get the variance in the columns ?
Thanks !
Ah, I see. Have you tried a new measure with the following DAX:
Variance = [CY]-[LY]this is assuming you have the CY and LY measures calculating the CY and LY sales respectively.