Forum Discussion
Show Measure for missing data point in dax
Thanks for promp reply Greg_Deckler , you just realized me my measure is not returning any value as there is no value for given calendar table week so nothing to return, now i made it work with simple allexept but i see my problem is more complex:
I found now that i need to reference to previus calculated measure value, not to constant value when there is no value to show from fact table, would you advise how to build such measure (that will produce the same value that was present in previously (previous date) ?
so what i'm receiving now is this:
and i'm expecting this:
many thanks for all your suggestions - not only in this topic, they save lives! (and a lot of time)
mhsk So, what you will need to do is to check if the value returns blank and you will need a table VAR that returns values for each date. Then you can get the MAX (MAXX) Date where that value is not blank and use the value for that date. I don't really know the specifics of your source data so it's hard to be specific.
- mhsk4 years agoHelper II
Greg_Deckler yes this is the logic i would need to pass to get the result. Check if blank its easy with ISBLANK but i can overcome creating virtual table that will check what is the last non blank value/date and copy that to any blank field until new value is present in the fact table. Would you suggest any solution? .pbix file is here https://we.tl/t-fgPJcyZ3ci
- mhsk4 years agoHelper II
Greg_Deckler any chance you could have a look at the pbix?
what you have written: "you will need a table VAR that returns values for each date." doesnt show up in any scenario which approach shall i take? any suggestion appreciated- Greg_Deckler4 years agoCommunity Champion
mhsk So, the concept would be this:
New Measure = VAR __Table = SUMMARIZE('Table',[Date],"__Value",[Your measure]) RETURN IF(ISBLANK([Your measure]), VAR __Date = MAXX(FILTER(__Table,[__Value] <> BLANK(),[Date]) RETURN MAXX(FILTER(__Table,[Date] = __Date),[__Value]), [Your measure] )