Forum Discussion
Count changes in a sequence; as.Timeline visualization
- 8 years ago
You may take a look at the following post.
You may take a look at the following post.
- zedleb8 years agoFrequent Visitor
Hi Sam
Thanks for your rapid response! I've taken a look at both your solution and the other conditional index solution. I see how these would work well.
However the issue I'm facing is that my sequence depends on a change in both reference and time. I want to count a change only when both have changed.
My sequence column is calculated thus:
Sequence by Reference = VAR CURRENTDATE = 'BR 2018 Washing Timelines'[Date Début Lavage] RETURN COUNTROWS ( FILTER ( CALCULATETABLE ( 'BR 2018 Washing Timelines', ALLEXCEPT ( 'BR 2018 Washing Timelines', 'BR 2018 Washing Timelines'[Référence] ) ), 'BR 2018 Washing Timelines'[Start Date] < CURRENTDATE || ( 'BR 2018 Washing Timelines'[Start Date] = CURRENTDATE ) ))based on Marco Russo's code
I note that your suggestion includes the use of Earlier (which Marco also suggests where VAR is not an option). Do you think I should use Earlier in my case (I'm not at all familiar with how it works) would it pick up the change in time and reference?
I will try later today and what result it gives me.
Thanks again for your help.
zedleb
- zedleb8 years agoFrequent Visitor
THANK YOU :smileyhappy:
Your code worked perfectly!
A very happy zedleb (after one solid week of trying to solve this!)
How do I mark as solved...?