Forum Discussion
hooleee
2 years agoRegular Visitor
How to set the null value to the previous value
This is original data,the supplier B dont have value when 2024/1/3 This is power bi table How to set the null value to the previous value. Like this,if the date has no value, the...
- 2 years ago
Daniel29195
Community Champion
2 years agomeasure =
VAR current_date =
MAX ( dimdate[date] )
VAR ds =
SELECTCOLUMNS (
CALCULATETABLE (
LASTNONBLANK (
VALUES ( dimdate[date] ),
[ measure]
),
REMOVEFILTERS ( dimdate ),
dimdate[date] <= current_date
),
dimdate[date]
)
VAR res =
CALCULATE (
[measure],
dimdate[date] = ds
)
return
res
let me know if it works for you ,
If my answer helped sort things out for you, i would appreciate a thumbs up 👍 and mark it as the solution ✅
It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🤠
- hooleee2 years agoRegular Visitor
thx for your answer 🙂