Forum Discussion
DISTINCT COUNT AND GROUP BY
Good morning Power BI community!
I have been running through some problems creating the correct measure, and I'm wondering if you guys can help.
I have a table that goes like this:
I created a measure which is a count distinct of books per writer per publishing house.
Now, what I would like to do is to create a measure which is a distinct count of books per publishing house and have both the measures in the same table.
The desired table is the following:
Thank you in advance for your suggestions/answers!
Hi houssamedd,
Try this formula, please. BTW, the first need doesn't need a measure. Try the built-in calculation.
Measure = CALCULATE ( DISTINCTCOUNT ( Table1[Book] ), ALLEXCEPT ( Table1, Table1[publishing house] ) )Best Regards,
Dale
2 Replies
- v-jiascu-msft
Microsoft Employee
Hi houssamedd,
Try this formula, please. BTW, the first need doesn't need a measure. Try the built-in calculation.
Measure = CALCULATE ( DISTINCTCOUNT ( Table1[Book] ), ALLEXCEPT ( Table1, Table1[publishing house] ) )Best Regards,
Dale- houssameddNew Member
Perfect, this worked.
Thank you Dale!