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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
jppuam
Helper V
Helper V

create a diference between 2 columns (month last month)

Hello,

i'm trying to create a measure that gives me the variation between values of a month and the month before.

 

how can i make that measure for the 3 columns that i show on the image,

 variation.jpg

thank you,

JR

1 ACCEPTED SOLUTION

Yulanda,

i've got it. using the function PREVIOUSMONTH it gives me the values that i've want.

 

thank you for the help,

JR

View solution in original post

4 REPLIES 4
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @jppuam,

 

Suppose the fields [PMR] in above matrix is a measure. To get the difference between current month and previous month, please new a measure like this:

last month value =
[PMR]
    - CALCULATE (
        [PMR],
        FILTER (
            ALL ( 'TableName' ),
            'TableName'[Mes]
                = SELECTEDVALUE ( 'TableName'[Mes] ) - 1
        )
    )

Regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Yuliana,

i've post on other message the formulas that i'm using for that calculation....

 

i dont really understand that formula that i've shown below. can you see my post and analise it ?

 

thank you,

JR

Yulanda,

that not quiet what i need, because you're doiing the diferente.

 

i need in the right column the values of the previous months, to make a variation from the current month versus the month before.

 

thank you,

JR

Yulanda,

i've got it. using the function PREVIOUSMONTH it gives me the values that i've want.

 

thank you for the help,

JR

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.