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.
Hi Team,
Need to solve the below and requried ur help.
I need to show the % change from current year vs previous year. Below is the proble and the outpu required.
Year qty
2017 10
2018 20
2019 30
Year qty % Chage Logic
2017 10 0%
2018 20 50% (10-20)/20
2019 30 67% (20-30)/30
Thanks,
Raj
Solved! Go to Solution.
Hi @Anonymous ,
Based on your description, you can create a measure as follows.
Measure =
var x1=MAXX(FILTER(ALL(Qty),[Year]=SELECTEDVALUE(Qty[Year])-1&&[Year]>=2017),[qty])
var x2=IF(MAX('Qty'[Year])=2017,MAX('Qty'[qty]),x1)
return
FORMAT(DIVIDE(MAX('Qty'[qty])-x2,MAX('Qty'[qty])),"percent")
Result:
Hope that's what you were looking for.
Best Regards,
Yuna
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Based on your description, you can create a measure as follows.
Measure =
var x1=MAXX(FILTER(ALL(Qty),[Year]=SELECTEDVALUE(Qty[Year])-1&&[Year]>=2017),[qty])
var x2=IF(MAX('Qty'[Year])=2017,MAX('Qty'[qty]),x1)
return
FORMAT(DIVIDE(MAX('Qty'[qty])-x2,MAX('Qty'[qty])),"percent")
Result:
Hope that's what you were looking for.
Best Regards,
Yuna
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
You may download my PBI file from here.
Hope this helps.
There is no pbix file there,
Hi,
There is. See bottm left in the image
Hi Ashish,
I am not able to find the file.
Regards,
Raj
That is the file (in the image). Just download it.
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 |
---|---|
114 | |
99 | |
82 | |
70 | |
61 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |