Forum Discussion
damj
7 years agoFrequent Visitor
consecutive day
Hi. Trying to create a column that counts consecutive days based on "Eventkode" sorted in "Litra" like the illustration shown below. Hope someone can help. Thanks in advance.
- 7 years ago
Hi damj
Create calculated columns
clc1 = CALCULATE(DISTINCTCOUNT('Table'[date]),FILTER(ALLEXCEPT('Table','Table'[litra]),[date]<=EARLIER('Table'[date]))) earlier day = CALCULATE(MAX('Table'[date]),FILTER(ALLEXCEPT('Table','Table'[litra]),'Table'[date]=EARLIER('Table'[date])-1)) clc 2 = IF([earlier day]=BLANK(),1,[clc1])Best Regards
MaggieCommunity Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-juanli-msft
Community Support
7 years agoHi damj
Create calculated columns
clc1 = CALCULATE(DISTINCTCOUNT('Table'[date]),FILTER(ALLEXCEPT('Table','Table'[litra]),[date]<=EARLIER('Table'[date])))
earlier day = CALCULATE(MAX('Table'[date]),FILTER(ALLEXCEPT('Table','Table'[litra]),'Table'[date]=EARLIER('Table'[date])-1))
clc 2 = IF([earlier day]=BLANK(),1,[clc1])
Best Regards
Maggie
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.