Forum Discussion

TimoKytta's avatar
TimoKytta
Regular Visitor
4 years ago
Solved

Counting distinct values within a table

Hello y'all   I'm trying to build a calculation to get the following result. I've earlier managed to to some similar with instructions found here, but for some reason I don't get this work right. ...
  • amitchandak's avatar
    4 years ago

    TimoKytta , try a new column like

     


    REFcount =
    CALCULATE (
    DISTINCTCOUNT ( DailyCapa2[WORKCENTER] ),
    FILTER ( DailyCapa2, [REFID] = earlier([REFID])))

  • smpa01's avatar
    4 years ago

    TimoKytta  you can write a measure like this

    Measure = CALCULATE(DISTINCTCOUNT('tbl'[Workcenter]),ALLEXCEPT('tbl','tbl'[Refid]))