Forum Discussion
LuciaS1
3 years agoRegular Visitor
Distinct count by groups
HI!
I need to count distinct count by groups. I tried this measue but I am not sure if it it right
COUNTX(DISTINCT(Data_2022), Data_2022[Tovar])
in group unique i need to count only distinct values of "tovary" so in thic pisture result will be 11
Is this measure right ? or is there some other way to count distinct values of groups
Thank you !
Hi,
I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.
expected result measure: = SUMX ( VALUES ( Data[Unique] ), CALCULATE ( DISTINCTCOUNT ( Data[Tovar] ) ) )
2 Replies
- LuciaS1Regular Visitor
Jihwan_Kim Thank you !
- Jihwan_KimSuper User
Hi,
I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.
expected result measure: = SUMX ( VALUES ( Data[Unique] ), CALCULATE ( DISTINCTCOUNT ( Data[Tovar] ) ) )