Hello,
I'm having problems showing the monthly % change for my dataset. I've done it with a set that has just one category of values, but I can't do it when there are multiple categories, like this:
Date | Category | Value |
Jan 20 | Meat | 250 |
Jan 20 | Wheat | 120 |
Jan 20 | Oil | 170 |
Feb 20 | Meat | 265 |
Feb 20 | Wheat | 124 |
Feb 20 | Oil | 178 |
Currently I'm showing the monthly value in a line chart, and using Category in Legend to show each one. What I need is to show all the lines for the % of increment for each month. Any ideas?
Thanks!
Solved! Go to Solution.
Hi,
You may download my PBI file from here.
Hope this helps.
Hi,
You may download my PBI file from here.
Hope this helps.
Hi @francomaestri ,
Please try this:
% change =
var _category = MAX('% Change'[Category])
var _date = MAX('% Change'[Date])
Var _value = MAX('% Change'[Value])// gets the current value
var _calc = CALCULATE(MAX('% Change'[Value]),Filter(All('% Change'), '% Change'[Date]<_date && '% Change'[Category]=_category))//gets the previous months value
var _change = Divide(_value - _calc,_calc)
return _change
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel
Proud to be a Super User!
Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!
User | Count |
---|---|
119 | |
75 | |
66 | |
51 | |
49 |
User | Count |
---|---|
183 | |
101 | |
80 | |
79 | |
77 |