Forum Discussion
ngct1112
5 years agoPost Patron
DAX - Most Frequent value
Hi, I would like to find the most frequenct value(most repeated times) by DAX. May I know is it possible? Original Table Item ID user 1 1 Peter 1 2 Peter 1 3 Alex 1 4...
- 5 years ago
Hi,
To your Table visual, drag the Item field and write these mesures
User count = counta(Data[User])
Most frequency = FIRSTNONBLANK(TOPN(1,VALUES(Data[User]),[User count]),1)
Drag the second measure to your visual.
Ashish_Mathur
5 years agoSuper User
Hi,
To your Table visual, drag the Item field and write these mesures
User count = counta(Data[User])
Most frequency = FIRSTNONBLANK(TOPN(1,VALUES(Data[User]),[User count]),1)
Drag the second measure to your visual.
ngct1112
5 years agoPost Patron
Hi Ashish_Mathur , may I have a futher question regarding this formula?
Is it possible I could add a filter in your formula like filter "group" = "B"
Appreciated if you could help
Original:
| Item | ID | user | group |
| 1 | 1 | Peter | A |
| 1 | 2 | Peter | A |
| 1 | 3 | Alex | A |
| 1 | 4 | Peter | B |
| 1 | 5 | Chris | B |
| 1 | 6 | Chris | B |
| 2 | 1 | Alex | A |
| 2 | 2 | Alex | A |
| 2 | 3 | Peter | B |
Desired result:
| Item | Mast Frequent(B) |
| 1 | Chris |
| 2 | Peter |