Forum Discussion
Abdulrahman_78
5 years agoNew Member
Distinct Count
Hi, I am a new power BI User. i have two data sets (Sales data by customer code by date and Customer Mapping) joint each other with Customer code Key. sample data sets are as under: Sales Data S...
themistoklis
5 years agoCommunity Champion
Create the following measure:
Measure = CALCULATE(DISTINCTCOUNT(Table_2[Merge Code]),FILTER(Table_1, Table_1[Sales]>0))
OR
You can simply create a column that flags records where sales are greater than 0.
Column = IF(Table_1[Sales]>0,1,0)
Then create a measure with the following formula:
Measure = CALCULATE(DISTINCTCOUNT(Table_2[Merge Code]),Table_1[Column]=1)