cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Calculate difference from previous month

I have the following table that looks as such

Values.PNG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

I am using the following formula to count all orders

 

numOrders = COUNTROWS(AllOrders)

I then calculate the total retailed orders based on whether there is a retail date

Total Retailed = CALCULATE (
    [numOrders],
      FILTER (
        'AllOrders',
        AND (
            NOT ( ISBLANK ( 'AllOrders'[RetailDate] ) ),
            DATEVALUE(AllOrders[RetailDate]) <= MAX ( BasicCalendarUS[DateKey] )
        )
    ))

I then calculate the total retailed orders year to date by using this formula

Total Retailed  YTD = CALCULATE (
    [Total Retailed],
    FILTER (
        'AllOrders',
        YEAR( 'AllOrders'[RetailDate] ) = YEAR( MAX ( BasicCalendarUS[DateKey] ) )
    )
)

Now what I want is to have it do a month over month calculation to see the difference. I am having trouble picking up a formula that looks to the previous month and subtracts it from the current month to give me the number. 

 

Below is a screenshot of what I am looking for. ( I left out some months for simplicity)

 

value2.PNG

 

Any help would be greatly appreciated 

 

Thanks!

Derek

2 REPLIES 2
Highlighted
Community Support
Community Support

Re: Calculate difference from previous month

Hi @dkbollig,

 

In my opinion, you can use a calculate column to store the running total, then write a measure to get the running total of previous month and calculate the different between current value and previous.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Post Prodigy
Post Prodigy

Re: Calculate difference from previous month

@v-shex-msftSounds like the idea. I can't see any operations in there so that might be something to consider.

Helpful resources

Announcements
Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Power Platform 2020 release wave 2 plan

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors