Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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] - MCBPreviousDayWith 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!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 38 | |
| 37 | |
| 28 | |
| 28 |
| User | Count |
|---|---|
| 124 | |
| 89 | |
| 73 | |
| 66 | |
| 65 |