Forum Discussion
Anonymous
5 years agoNot applicable
Countrows with multiple conditions
Hi, I'd like to count rows with multiple conditions. The first measure seems to work well. But the second one doesn't work. The only thing I changed is the time difference, from 10s to 2hr. Event V2...
Anonymous
5 years agoNot applicable
Hi Anonymous ,
I think you need to show the expected result of your sample data.
I use your sample data to create a calculated column, hope that's what you want, please try.
Column = SUMX(Sheet1,IF([SITE_NO]=EARLIER([SITE_NO]) &&
[START_DT]>EARLIER([START_DT]) &&
[EVENT_CODE]=EARLIER([EVENT_CODE]) &&
DATEDIFF(EARLIER(Sheet1[END_DT]),Sheet1[START_DT],SECOND) <= 10,
1,
0))
Aiolos Zhao
Anonymous
5 years agoNot applicable
Hi Anonymous
Please read message 5 for expected output. The sample data size is so tiny compared to the one I am working on.
I am afraid I won't be able to add the calculated column for years worth of data (approx. 10M rows). That's why I wanted DAX measure to combine repeated events with above conditions.