The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi friends,
I have created a matrix column for profits of previous years and months,i now need to show the profit grow percentage compared to the previous date,how can i do that ?
Thanks
Solved! Go to Solution.
Hi, @Danteee
You can try the following methods.
Measure:
Previous date value =
Var _Previousdate=MAXX(FILTER(ALL('Table'),[Date]<SELECTEDVALUE('Table'[Date])),[Date])
Return
CALCULATE(SUM('Table'[Profit]),FILTER(ALL('Table'),[Date]=_Previousdate))
Measure % =
Var _divide=DIVIDE(SUM('Table'[Profit])-[Previous date value],SUM('Table'[Profit]))
Return
IF([Previous date value]=BLANK(),BLANK(),_divide)
Is this the result you expect? Please see the attached document.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Danteee
You can try the following methods.
Measure:
Previous date value =
Var _Previousdate=MAXX(FILTER(ALL('Table'),[Date]<SELECTEDVALUE('Table'[Date])),[Date])
Return
CALCULATE(SUM('Table'[Profit]),FILTER(ALL('Table'),[Date]=_Previousdate))
Measure % =
Var _divide=DIVIDE(SUM('Table'[Profit])-[Previous date value],SUM('Table'[Profit]))
Return
IF([Previous date value]=BLANK(),BLANK(),_divide)
Is this the result you expect? Please see the attached document.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I assume you have the date table in your data model.
Use below measure for calculating Profit %:
ProfitGrowthPercentage =
DIVIDE(
YourData[Profit] - CALCULATE(SUM(YourData[Profit]),
FILTER(YourData, YourData[Date] = YourData[PreviousDate])),
CALCULATE(SUM(YourData[Profit]),
FILTER(YourData, YourData[Date] = YourData[PreviousDate]))
)
result of this formula will be a percentage representing the profit growth compared to the previous date. If the result is positive, it indicates an increase in profit, and if it's negative, it indicates a decrease
If this helped, Subscribe AnalyticPulse on YouTube for future updates:
https://www.youtube.com/@AnalyticPulse
https://instagram.com/analytic_pulse
https://analyticpulse.blogspot.com/
please subscribe to Youtube channel For fun facts:
https://www.youtube.com/@CogniJourney
User | Count |
---|---|
25 | |
12 | |
8 | |
8 | |
7 |
User | Count |
---|---|
28 | |
13 | |
12 | |
12 | |
6 |