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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
RJ_KON
Helper I
Helper I

Measure to Calculate difference between values in existing column row by row

Hi all, i am new to power BI and DAX. i got an issue in writing simple measure. Please see below my query.

Below is the table i am working on.

Period   Index     TC count     VARIANCE

P01           1             10402           Blank

P01           2            8925            (10402-8925)

P01           3              10258           (8925-10258)

P01           4            12216           (10258-12216)

 

My table name is VARIANCE_19_20

BELOW IS MEASURE I AM TRYING, BUT DIDN'T WORK.

VARIANCE = 
VAR NextIndex = VARIANCE_19_20[INDEX] - 1
RETURN
    VARIANCE_19_20[TC Count]
        - CALCULATE (
            VALUES ( VARIANCE_19_20[TC Count] ),
            FILTER ( ALL ( VARIANCE_19_20), VARIANCE_19_20[INDEX] = NextIndex)
        )

I am trying to write a measure to see difference in Variance column as shown in above table.

Please help

0 REPLIES 0

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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