Forum Discussion
SuperCal99
4 years agoHelper I
Calculate % difference between two years
I would like to work out % difference between 2 years for a set of values and having some trouble doing so. First of all, let’s say I have the following sample of data Year Fruit Name ...
- 4 years ago
SuperCal99 , You need create a separate year table(say Date) and the create a measure like
example
This Year = CALCULATE(sum('Table'[Qty]),filter(ALL('Date'),'Date'[Year]=max('Date'[Year])))
Last Year = CALCULATE(sum('Table'[Qty]),filter(ALL('Date'),'Date'[Year]=max('Date'[Year])-1))diff = [This Year]-[Last Year ]
diff % = divide([This Year]-[Last Year ],[Last Year ])
Anonymous
4 years agoNot applicable
Hi SuperCal99 ,
You can refer to the following link to try out grouping in a custom matrix:
https://community.powerbi.com/t5/Desktop/Matrix-column-header-label-custom-group/td-p/1253196
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.