Forum Discussion
How to persist a column over time?
- 6 years ago
See attached PBIX. One, you need an actual Date column. Two, I can't tell what your dates are, is Nov-19 11/1/2019 or 11/19/????
Assuming the first, you have an issue in your data where you have September 2020 as not a 1 so maybe it is the other way? Difficult to tell.
Anyway, see attached and let me know.
Perhaps a variation of Cthulhu - https://community.powerbi.com/t5/Quick-Measures-Gallery/Cthulhu/m-p/509739#M211
Thanks for replying Greg_Deckler but couldn't exactly replicate the logic in this scenario.
Would it be possible for you to list it out explicitly?
Thanks in advance!
- Greg_Deckler6 years agoCommunity Champion
Yeah, that logic is nasty. Yours however is simpler:
Column =VAR __Table = FILTER('Table',[Date] <= EARLIER([Date]) && [Product]=EARLIER([Product]) && [Market]=EARLIER([Market]))RETURNIF(SUMX(__Table,[Value])>0,1,BLANK())- Anonymous6 years agoNot applicable
Greg_Deckler Thanks for sharing the code. It is however not giving the 'Required Column' results for all records. Can you please check once? I was trying a similar thing since long 😞
- Greg_Deckler6 years agoCommunity Champion
See attached PBIX. One, you need an actual Date column. Two, I can't tell what your dates are, is Nov-19 11/1/2019 or 11/19/????
Assuming the first, you have an issue in your data where you have September 2020 as not a 1 so maybe it is the other way? Difficult to tell.
Anyway, see attached and let me know.