This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hi there !
i would like your help on this. I dont know how to search and how to make the following calculation.
I have the following columns:
User Session Category
Juan A Z
Maria B Y
Juan C X
Juan C X
Juan A Y
Maria C X
Maria B X
so i would like to count by user, how many DISTINCT CATEGORY they have. For that i've created an unique user column, usar + session:
uniqueuser countDISTINCTCategory
JuanA 2
JuanC 1
MariaB 2
MariaC 1
i think that i have to use group by, or something like that (DAX function). Any suggestions?
Thanks
Solved! Go to Solution.
Hi @fiorela
you dont need any additional columns, just try a measure
countDISTINCTCategory = calculate(DISTINCTCOUNT('Table'[Category]), ALLEXCEPT('Table', 'Table'[User]))
do not hesitate to give a kudo to useful posts and mark solutions as solution
hey
How to get this in power Query.
Thanks
All you need is this measure;
Number of categories = DISTINCTCOUNT('DataTable CatUser'[Category])
And you can then create a table or matrix to display the breakdown by User or by User/Session:
Proud to be a Super User!
Paul on Linkedin.
thank you so much !!! works too
Hi @fiorela
you dont need any additional columns, just try a measure
countDISTINCTCategory = calculate(DISTINCTCOUNT('Table'[Category]), ALLEXCEPT('Table', 'Table'[User]))
do not hesitate to give a kudo to useful posts and mark solutions as solution
This measure works to me.
Thanks
let me try this, and i will let you know if that works. Thanks in advance
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 36 | |
| 28 | |
| 28 | |
| 20 | |
| 18 |
| User | Count |
|---|---|
| 65 | |
| 35 | |
| 33 | |
| 25 | |
| 24 |