Forum Discussion
aiyosap
Helper II
4 years agoHow to count a value in column based on grouping (DAX)?
Hi all, I am trying to create a calculate column using COUNT function to derive the count value of the "Case Number" based on the column of "File Date" grouping. For some reason my calculate row d...
- Anonymous4 years ago
Hi aiyosap ,
Here are the steps you can follow:
1. Create calculated column.
Count_Column = CALCULATE(COUNT('Table'[Case Number]),FILTER(ALL('Table'),'Table'[File Date]=EARLIER('Table'[File Date])&&'Table'[Case Number]=EARLIER('Table'[Case Number])))2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Anonymous
4 years agoNot applicable
Hi aiyosap ,
Here are the steps you can follow:
1. Create calculated column.
Count_Column = CALCULATE(COUNT('Table'[Case Number]),FILTER(ALL('Table'),'Table'[File Date]=EARLIER('Table'[File Date])&&'Table'[Case Number]=EARLIER('Table'[Case Number])))
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
LozzieDuff
1 year agoNew Member
Hi Liu,
Why the need for an ALL() in your answer? I tried it in my context without the ALL() and it appears to work. But you had something in mind presumably that I might not be experiencing (yet!) but would like to know what it is.
Thanks in advance.