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
Hey there,
I have a "date" table and another table "Tank" , I have a measure to get the LASTNONBLANKVALUE, now I need another measure to get the second LASTNONBLANKVALUE.
here is the BI file
Thank you
Solved! Go to Solution.
Hi,
Please try something like below.
Before Last day nonblank all clusters - tank =
VAR _lastnonblankdate =
MAXX (
FILTER (
ADDCOLUMNS ( VALUES ( 'Date'[Date] ), "@sumofvaluetank", [SumOfValue_tank] ),
[@sumofvaluetank] <> BLANK ()
),
'Date'[Date]
)
VAR _beforelastnonblankdate =
MAXX (
FILTER (
ADDCOLUMNS (
FILTER ( VALUES ( 'Date'[Date] ), 'Date'[Date] < _lastnonblankdate ),
"@sumofvaluetank", [SumOfValue_tank]
),
[@sumofvaluetank] <> BLANK ()
),
'Date'[Date]
)
RETURN
CALCULATE ( [SumOfValue_tank], 'Date'[Date] = _beforelastnonblankdate )
Hi,
Please try something like below.
Before Last day nonblank all clusters - tank =
VAR _lastnonblankdate =
MAXX (
FILTER (
ADDCOLUMNS ( VALUES ( 'Date'[Date] ), "@sumofvaluetank", [SumOfValue_tank] ),
[@sumofvaluetank] <> BLANK ()
),
'Date'[Date]
)
VAR _beforelastnonblankdate =
MAXX (
FILTER (
ADDCOLUMNS (
FILTER ( VALUES ( 'Date'[Date] ), 'Date'[Date] < _lastnonblankdate ),
"@sumofvaluetank", [SumOfValue_tank]
),
[@sumofvaluetank] <> BLANK ()
),
'Date'[Date]
)
RETURN
CALCULATE ( [SumOfValue_tank], 'Date'[Date] = _beforelastnonblankdate )
Appreciate your fast response, it worked 👍
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 41 | |
| 38 | |
| 36 | |
| 30 | |
| 28 |
| User | Count |
|---|---|
| 128 | |
| 88 | |
| 79 | |
| 67 | |
| 62 |