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
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
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