Forum Discussion
Anonymous
5 years agoNot applicable
How to do a double DISTINCTCOUNT?
Hello everyone, My table follows this structure: Item Code Class FFF 15.1 A FFF 16.1 B YYY 15.1 A YYY 15.1 A YYY 20.1 A XXX 16.1 C As you can see, an item can...
- 5 years ago
Hi,
This measure works
=SUMX(SUMMARIZE(VALUES(Data[Item]),Data[Item],"ABCD",DISTINCTCOUNT(Data[Code])),[ABCD])
Hope this helps.
ryan_mayu
5 years agoSuper User
Anonymous
you can try this
Measure =
VAR _TBL=SUMMARIZE('Table','Table'[Item],"_count",DISTINCTCOUNT('Table'[Code]))
return SUMX(_TBL,[_count])
- Anonymous5 years agoNot applicable
Hey ryan_mayu
I tried to create this measure of yours here, but it gives me an error in the "return" part (unexpected expression). How can I create your measurement without this error happening to me?