Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Danteee
Regular Visitor

Howcan i create a measure to show the profit percentage of last year to this year?

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 ?

Danteee_0-1700570755285.png

Thanks

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

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)

vzhangti_0-1700723635025.png

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.

View solution in original post

2 REPLIES 2
v-zhangti
Community Support
Community Support

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)

vzhangti_0-1700723635025.png

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.

AnalyticPulse
Super User
Super User

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.