Hi, I'm trying to add '% Change from Last Year' column onto this matrix. Is it possible to add in a column that looks at one year (e.g. 2022) then works out the percentage difference to the year prior (e.g. 2021)? Photo attached. Do I need to create a measure?
Solved! Go to Solution.
Hope this helps
@Padycosmos It actually has stopped showing the error but when you add it to the table, it says they are all 0.99. I think that may be because the matrix shown has a filter on it for 'Provider Name' as it shows just the data from one university whereas the dataset/domicile table has all. Is there a way around this without creating a new dataset that only includes the provider I am showing the matrix?
Hi @Padycosmos, my only issue with this is that it does not seem to work as the CY and PY after var do not go green like yours, or just the last letter does? I have tried putting in extar spaces but does not seem to work.
Thanks for your help1
Could you share the screenshot of the measure?
@ShaunGibbs23 So like this?
Measure =
VAR __ThisYear = SUM('Table'[Applications])
VAR __LastYear = SUMX(FILTER('Table',[Year] = MAX('Table'[Year] -1),[Applications])
VAR __Diff = __ThisYear - __LastYear
VAR __Result = DIVIDE(__Diff, __LastYear,0)
RETURN
__Result
Thanks for your help. When I try the following syntax, when I get to VAR_Diff, it only recognises VAR_This Year and not Last Year. Do you have any idea what may be going wrong with the second line? Attached is a photo of the error bar (my table/data is called Domicile in the error that I have changed below for ease).
User | Count |
---|---|
123 | |
63 | |
56 | |
46 | |
41 |
User | Count |
---|---|
115 | |
66 | |
61 | |
60 | |
45 |