Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Dax

Hello!

 

I have a random request with Power BI that I am working on. I am creating a bar graph but I need to show the volume from the previous month on the current month.

Below you see March has 843 and February has 527 and 679 for Jan. 

I want the visual to show Aprils volume for Match which would be 700. So March would be 700 instead of 843. 

February will be 679 instead of 527 and Jan will be 527 instead of 843. 

 

Is there a way to do this as a measure?

 

 

  • If you have a date table, you can use:

    Previous month value = CALCULATE (Your volume measure], DATEADD(Date table [Date], -1, MONTH))

2 Replies

  • PaulDBrown's avatar
    PaulDBrown
    Community Champion

    If you have a date table, you can use:

    Previous month value = CALCULATE (Your volume measure], DATEADD(Date table [Date], -1, MONTH))

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    Does the replies above solve your problem? If it has been solved, please mark the correct reply as the standard answer to help the other members find it more quickly.Thank you very much for your kind cooperation!

     

    Hope it helps,


    Community Support Team _ Caitlyn

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