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.
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!
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 |
---|---|
110 | |
109 | |
89 | |
76 | |
66 |
User | Count |
---|---|
126 | |
112 | |
99 | |
82 | |
73 |