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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
LCarenzo
Helper I
Helper I

Divide....

I am stuck.  I have the following columns:

 

Month

Value

Category

 

I am trying to take last months value and subtract it from this months value - I want to be able to sort it by the category.  Basically I am looking for the month over month difference, but the issue is my month is in the same column.

 

How can I set this up to properly show the difference?

 

Thanks in advance.

 

1 ACCEPTED SOLUTION
some_bih
Super User
Super User

Hi @LCarenzo search part Month-over-month in the link https://www.daxpatterns.com/standard-time-related-calculations/ 

"month is in the same column" is good 🙂

I hope this help





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






View solution in original post

3 REPLIES 3
devanshi
Helper V
Helper V

VAR currentMonth = [Month]
VAR currentvalue = [Value]
VAR perviousmonthvalue = CALCULATE(
                                                            MAX([Value]), FILTER(ALL('TableName'),
                                                                                               [Category] = EARLIER([Category], 
                                                                                                [Month] <currentMonth
                                                                                               )
                                                                              currentvalue - perviousmonthvalue          
                                                        )
                                                        

Anonymous
Not applicable

Hi @LCarenzo,

Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or Accept the helpful suggestions to help others who faced similar requirements.

If these also don't help, please share more detailed information and description to help us clarify your scenario to test.

How to Get Your Question Answered Quickly 

Regards,

Xiaoxin Sheng

some_bih
Super User
Super User

Hi @LCarenzo search part Month-over-month in the link https://www.daxpatterns.com/standard-time-related-calculations/ 

"month is in the same column" is good 🙂

I hope this help





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.