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
MGorak
Frequent Visitor

Calculated coulumn - value diffrence, betweek last and earlier value

Hello

I,m try to make calculated coulumn with value diffrence, actual and last(in SPC, diffrence between measure and last measure).

But only in this same Product code and Measure number (Atrybut coulumn, M1,M2....)

This calulumn not work propperly

 

Thank You

Diffrence =
VAR a =
    CALCULATE (
        FIRSTNONBLANK ( 'Counterlid Claudia 609 StartREC spc'[Value],  0),
        FILTER ( 'Counterlid Claudia 609 StartREC spc', 'Counterlid Claudia 609 StartREC spc'[StartDateTime] = EARLIER ( 'Counterlid Claudia 609 StartREC spc'[StartDateTime] ) )
    )
RETURN
    IF ( a = BLANK (), 0, ABS (  'Counterlid Claudia 609 StartREC spc'[Value] ) - a )
 
table.jpg
4 REPLIES 4
tamerj1
Super User
Super User

Hi @MGorak 
What is the expected result? Also please clarify which one is considered the last value?

Expected is diffrenece between last two mesaurments like below

Last by Date/Time in coulumn StartDataTime

 

expected.jpg

 

 

@MGorak 

In order to understand exactly what is you intended result, kindly provide the correct values in the screenshot below. Thank you.

Screenshot.jpg

Zrzut ekranu 2022-11-29 112428.jpg

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!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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.