Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Please help me to get non blank value in Power Bi.
Example: data has historical in table. But always showing the latest data. one of the column has the empty value in that case.. if there is an empty for the latest data then need to check the previous non-empty value from the data and dispaly.
Solved! Go to Solution.
Hi @thathavenkat ,
You can try to create a measure as below:
Measure =
var _curdate=MAX('Test'[Date])
var _nonValueDate=CALCULATE(MAX('Test'[Date]),FILTER(ALL('Test'),'Test'[Date]<=_curdate&&NOT(ISBLANK('Test'[Qty]))))
return CALCULATE(MAX('Test'[Qty]),FILTER(ALL('Test'),'Test'[Date]=_nonValueDate))
In addition, you can review the solutions in the following threads and check if they can help you:
Return latest value present in power BI
Fill in blanks with last non blank value
Best Regards
Rena
Hi @thathavenkat ,
You can try to create a measure as below:
Measure =
var _curdate=MAX('Test'[Date])
var _nonValueDate=CALCULATE(MAX('Test'[Date]),FILTER(ALL('Test'),'Test'[Date]<=_curdate&&NOT(ISBLANK('Test'[Qty]))))
return CALCULATE(MAX('Test'[Qty]),FILTER(ALL('Test'),'Test'[Date]=_nonValueDate))
In addition, you can review the solutions in the following threads and check if they can help you:
Return latest value present in power BI
Fill in blanks with last non blank value
Best Regards
Rena
maybe you can try lastnonblank
https://docs.microsoft.com/en-us/dax/lastnonblank-function-dax
Proud to be a Super User!
User | Count |
---|---|
97 | |
87 | |
77 | |
67 | |
63 |
User | Count |
---|---|
110 | |
95 | |
95 | |
64 | |
59 |