cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Month over Month

Hello!

 

I am trying to figure out why calculation to show previous month load volume is not adding correctly. 

 

Last Month =
CALCULATE([Load Count],
PARALLELPERIOD(Table Name[Actual Delivery].[Date],-1,MONTH))

 

Currently the Formula I am using- 

 

For Some reason It adds up the previous calculation instead of pulling only the last month value. 

 

The table should read 

blank, 510, 527, 843 etc.

Csmith31_0-1634756236003.png

 

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi,@Csmith31 

You can try the following methods:

1. Create a new date calculation column to calculate the actual time of the previous month of the current row.

Date =
PARALLELPERIOD ( 'Table'[Mouth], -1, MONTH )

vzhangti_0-1635128150113.png

2. Use the Date column to match the value that Last Mouth should display.

Last Month =
CALCULATE (
    MIN ( 'Table'[Load Volume] ),
    FILTER ( 'Table', 'Table'[Mouth] = EARLIER ( 'Table'[Date] ) )
)

vzhangti_1-1635128269402.png

3. If you don't want to display the Date column, you can choose to hide it in the view.

vzhangti_2-1635128327391.jpeg

Best Regards

Community Support Team _Charlottez  Zhang

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,@Csmith31 

You can try the following methods:

1. Create a new date calculation column to calculate the actual time of the previous month of the current row.

Date =
PARALLELPERIOD ( 'Table'[Mouth], -1, MONTH )

vzhangti_0-1635128150113.png

2. Use the Date column to match the value that Last Mouth should display.

Last Month =
CALCULATE (
    MIN ( 'Table'[Load Volume] ),
    FILTER ( 'Table', 'Table'[Mouth] = EARLIER ( 'Table'[Date] ) )
)

vzhangti_1-1635128269402.png

3. If you don't want to display the Date column, you can choose to hide it in the view.

vzhangti_2-1635128327391.jpeg

Best Regards

Community Support Team _Charlottez  Zhang

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

 

ryan_mayu
Super User
Super User

@Anonymous 

pls try to add a calendar table and use DATEADD.

https://docs.microsoft.com/en-us/dax/dateadd-function-dax

 





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

Proud to be a Super User!




Helpful resources

Announcements
May 23 2022 epsiode 5 without aka link.jpg

The Power BI Community Show

Welcome to the Power BI Community Show! Jeroen ter Heerdt talks about the importance of Data Modeling.

charticulator_carousel_with_text (1).png

Charticulator Design Challenge

Put your data visualization and design skills to the test! This exciting challenge is happening now through May 31st!

Power BI Dev Camp Session 22 with aka link 768x460.jpg

Check it Out!

Join us on Thursday, May 26 at 11a PDT for a great session with Ted Pattison!

Power BI Release May 2022 768x460.png

Check it out!

Click here to read more about the May 2022 updates!

Top Kudoed Authors