Forum Discussion

aiyosap's avatar
aiyosap
Icon for Helper II rankHelper II
4 years ago
Solved

How 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...
  • smpa01's avatar
    4 years ago

    aiyosap 

    Measure= calculate (count(tbl[case number]), allexcept(tbl, tbl[case number],tbl[file date]))

  • Anonymous's avatar
    Anonymous
    4 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