March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi,
I created a measure to calcute percentage. Requirment is to obtain Today's and previous days value. Which will be compared to show trend.
Thank you.
Solved! Go to Solution.
@atiftanveer
Follow this pattern:
Change % =
VAR __CurrentValue = [Measure]
VAR __PrevDateValue =
CALCULATE ( [Measure], OFFSET ( -1, ALLSELECTED ( TABLE[Date] ) ) )
RETURN
DIVIDE ( __CurrentValue - __PrevDateValue, __PrevDateValue )
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Hi @Fowmy
Happy New Year. I resume work on this after vacation. I acheive my goal by creating an Rank on date and used it in measure as filter:
REMOVEFILTERS() is to remove page filters from this measrue.
Appreciate your help, I might not able to apply your solution correctly.
Regards
@atiftanveer
Follow this pattern:
Change % =
VAR __CurrentValue = [Measure]
VAR __PrevDateValue =
CALCULATE ( [Measure], OFFSET ( -1, ALLSELECTED ( TABLE[Date] ) ) )
RETURN
DIVIDE ( __CurrentValue - __PrevDateValue, __PrevDateValue )
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Hi Fowmy,
I appreciate you spare you time to look in to it. You suggestion work fine for totals. My requirement is to get percentage of today which is 72.95% and yesterday which is 63.93% then I will calculate the differnce (Today - Yesterday).
Regards
@atiftanveer
I hope that is what exactly the measure that I shared works.
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Hi @Fowmy
Happy New Year. I resume work on this after vacation. I acheive my goal by creating an Rank on date and used it in measure as filter:
REMOVEFILTERS() is to remove page filters from this measrue.
Appreciate your help, I might not able to apply your solution correctly.
Regards
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
108 | |
73 | |
53 | |
52 | |
44 |
User | Count |
---|---|
161 | |
110 | |
69 | |
58 | |
50 |