The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi Team,Please find the datamodel and output that i require.
I want show difference between current value and last non blank value.
I tried NONBLANKVALUE, howeve its not working.
please help me on this.
Try
Diff with previous =
VAR CurrentDate =
MAX ( 'Date'[Date] )
VAR CurrentValue =
SELECTEDVALUE ( 'Fact'[Value] )
VAR PrevValue =
CALCULATE (
LASTNONBLANKVALUE ( 'Fact'[Date], 'Fact'[Value] ),
'Date'[Date] < CurrentDate
)
RETURN
CurrentValue - PrevValue
User | Count |
---|---|
80 | |
73 | |
40 | |
30 | |
28 |
User | Count |
---|---|
107 | |
97 | |
55 | |
47 | |
46 |