Forum Discussion
giuliapiazza94
Helper IV
5 years agoCount distinct values
Hi guys, This is my problem I want to count how many name for each sales: for example, A has got 2 name and I need to create a new column with the number 2 (like in the picture). No measur...
- 5 years ago
Here's some DAX to get your results.
count(sales/name) =CALCULATE(DISTINCTCOUNT('Table'[name]),ALLEXCEPT('Table', 'Table'[Sales]))
PaulOlding
Solution Sage
5 years agoHere's some DAX to get your results.
count(sales/name) =
CALCULATE(
DISTINCTCOUNT('Table'[name]),
ALLEXCEPT('Table', 'Table'[Sales])
)
giuliapiazza94
Helper IV
5 years agoWorks very well! Thank you so much 😊