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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
paulfink
Post Patron
Post Patron

Month over Month Change

Hi guys,

 

need a hand with this.

 

I want to do the following:

  1. total progress per month
  2. Calculate change over each month

 

I have a progress and a date table.

 

I have tried using this formula for my measure:

Last Month = CALCULATE([Total Progress], PREVIOUSMONTH('Progress Table'[Date]))
Total Progress= SUM('Progress Table'[Progress Amount] 

 

Also tried swapping out PREVIOUSMONTH with PARELLELPERIOD but my results are blank.

 

I cant seem to use SUM either as my sales table records day by day so if i have 100 for every day in the month all rows will be 3100

 

how can i shift the row up so i can see the difference like this using DAX:

 

image.png

1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

Hi @paulfink ,

 

The data model will usually contain temporal information at different granularities, and when you need to aggregate data by year, month, or other temporal granularity, it is a better choice to use columns in the date table rather than extracting the date part from a new calculated column in the fact table or using the date column in the fact table directly.
If it is based on your formula above, try converting it to the following formula and try again.

vhenrykmstf_0-1644288605034.png

PreviousMonth =
CALCULATE (
    SUM ( 'Table'[Total Scans] ),
    ALL ( 'Table' ),
    PREVIOUSMONTH ( 'Table'[Date] )
)

vhenrykmstf_1-1644288658311.png


If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your feedback.


Best Regards,
Henry


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-henryk-mstf
Community Support
Community Support

Hi @paulfink ,

 

The data model will usually contain temporal information at different granularities, and when you need to aggregate data by year, month, or other temporal granularity, it is a better choice to use columns in the date table rather than extracting the date part from a new calculated column in the fact table or using the date column in the fact table directly.
If it is based on your formula above, try converting it to the following formula and try again.

vhenrykmstf_0-1644288605034.png

PreviousMonth =
CALCULATE (
    SUM ( 'Table'[Total Scans] ),
    ALL ( 'Table' ),
    PREVIOUSMONTH ( 'Table'[Date] )
)

vhenrykmstf_1-1644288658311.png


If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your feedback.


Best Regards,
Henry


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@paulfink , You need to use date table marked as date table 

 

Last Month = CALCULATE([Total Progress], PREVIOUSMONTH('DAte'[Date]))

 

 

Why Time Intelligence Fails - Powerbi 5 Savior Steps for TI :https://youtu.be/OBf0rjpp5Hw
https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5b...
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.  

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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