Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
99 | |
80 | |
70 | |
60 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |