Forum Discussion

aritz001's avatar
aritz001
Frequent Visitor
3 years ago
Solved

Help with Total calculation when using DistinctCount

I used the following formula within a measure as suggested however my total is incorrect. The total for Staff Count column should be 8,850.

 

 

 

 

SUM DISTINCT COUNT =
VAR _DISTINCTCOUNT =
CALCULATE ( DISTINCTCOUNT ( 'tblTimeCombined_TimeDetail'[Staff ID] ) )
RETURN
SUMX (
SUMMARIZE (
'tblTimeCombined_TimeDetail',
'tblTimeCombined_TimeDetail'[Date]
),
_DISTINCTCOUNT
)

 

Here are the more details. Refer to red boxes for more details.

 

 

 

  • Hi aritz001 ,
    Can you try using this measure instead -
    Measure = SUMX(SUMMARIZE('tblTimeCombined_TimeDetail',
    'tblTimeCombined_TimeDetail'[Date],"count", DISTINCTCOUNT ( 'tblTimeCombined_TimeDetail'[Staff ID] ) ),[count])

    Hope this helps!

     

    Thanks,

    Avantika Thakur

2 Replies