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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors