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.
Hello,
please suggest how to calculate growth of the signal.
I tried something like, but seems I do not understand logic well
MCBcounter = VAR MCBPreviousDay = calculate( MIN('[7230004][01][35 05]'[Value]) RETURN '[7230004][01][35 05]'[Value] - MCBPreviousDay
With regards
Solved! Go to Solution.
Hi @kadapavel, you're going in the right direction - the signal growth = today's value - previous day's value
The previous day's row could be thought of as having the maximum timestamp that's less than today's timestamp.
There is probably a more elegant way to express this idea, but this is how I'd do it :
Define a calculated column :
=VAR thisOrderBy = '[7230004][01][35 05]'[SignalTimestamp] VAR thisEntity = '[7230004][01][35 05]'[Name] VAR thisValue = '[7230004][01][35 05]'[Value] VAR prevValue = CALCULATE( FIRSTNONBLANK('[7230004][01][35 05]'[Value], 0) , CALCULATETABLE( TOPN( 1 , '[7230004][01][35 05]' , '[7230004][01][35 05]'[SignalTimestamp] , DESC ) , ALL( '[7230004][01][35 05]' ) , '[7230004][01][35 05]'[Name] = thisEntity , '[7230004][01][35 05]'[SignalTimestamp] < thisOrderBy ) ) RETURN IF( ISBLANK(prevValue) , BLANK() , thisValue - prevValue )
Hi @kadapavel
Try this calculated column
MCB Counter = VAR PreviousDate = CALCULATE ( MAX ( TableName[SignalTimeStamp] ), FILTER ( ALL ( TableName ), TableName[SignalTimeStamp] < EARLIER ( TableName[SignalTimeStamp] ) ) ) RETURN TableName[Value] - CALCULATE ( SUM ( TableName[Value] ), FILTER ( ALL ( TableName ), TableName[SignalTimeStamp] = PreviousDate ) )
Hi @kadapavel, you're going in the right direction - the signal growth = today's value - previous day's value
The previous day's row could be thought of as having the maximum timestamp that's less than today's timestamp.
There is probably a more elegant way to express this idea, but this is how I'd do it :
Define a calculated column :
=VAR thisOrderBy = '[7230004][01][35 05]'[SignalTimestamp] VAR thisEntity = '[7230004][01][35 05]'[Name] VAR thisValue = '[7230004][01][35 05]'[Value] VAR prevValue = CALCULATE( FIRSTNONBLANK('[7230004][01][35 05]'[Value], 0) , CALCULATETABLE( TOPN( 1 , '[7230004][01][35 05]' , '[7230004][01][35 05]'[SignalTimestamp] , DESC ) , ALL( '[7230004][01][35 05]' ) , '[7230004][01][35 05]'[Name] = thisEntity , '[7230004][01][35 05]'[SignalTimestamp] < thisOrderBy ) ) RETURN IF( ISBLANK(prevValue) , BLANK() , thisValue - prevValue )
Hi @kadapavel
Try this calculated column
MCB Counter = VAR PreviousDate = CALCULATE ( MAX ( TableName[SignalTimeStamp] ), FILTER ( ALL ( TableName ), TableName[SignalTimeStamp] < EARLIER ( TableName[SignalTimeStamp] ) ) ) RETURN TableName[Value] - CALCULATE ( SUM ( TableName[Value] ), FILTER ( ALL ( TableName ), TableName[SignalTimeStamp] = PreviousDate ) )
Thank you very much!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
97 | |
96 | |
81 | |
74 | |
66 |
User | Count |
---|---|
126 | |
106 | |
105 | |
86 | |
72 |