Forum Discussion
Water
Helper II
5 years agoCount based on distinct values in another column of same table – DAX for measure?
Hello, New to Power Bi, so pardon my probably novice (and first!) question. Below is my simplified dataset. I want to create a table counting the number of units worked on in a year as per distinct...
- 5 years ago
Hi,
Try this measure:
Measure = SUMX(SUMMARIZE(VALUES(Data[WO]),Data[WO],"ABCD",DISTINCTCOUNT(Data[Unit Number])),[ABCD])
Hope this helps.
mahoneypat
Microsoft Employee
5 years agoLooks like you just need = DISTINCTCOUNT(Workorders[WO_NO])
Have you tried that? Also, do you have a separate Date table? If so, make sure that both columns in the relationship between your Date and Workorders table are the same (type Date).
Pat
newpowerbiuser8
Helper I
3 years ago
Hello!
I want to calculate distinct values of column A. Which i did by using the distinct function in a measure I created.
Now I want to calculate the total number of "No" for each unique value only. Can anyone please help? mahoneypat
For example the total should be 3 for "No" as I want to count for Saturday as only 1 not 2 times.