Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi,
I create a Power BI visualisation.
I need to create this from my dataset:
The Most often department for name is the most often value that has that value of department for name. It means:
John - 3* D1, 1* D2, 1* D3 so the most often value of department is D1
George - 2* D2, 1* D3 so the most often value of department is D2
Jack - 1* D1 so the most often value of department is D1
How to do it?
Thank you for your ideas.
George
Solved! Go to Solution.
@JiriS , All three as new columns
Dept Count =
countx(filter(table,[name] =earlier[Name] && [Department]=earlier([department)),[Department])
Dept Rank = rankx(filter(table,[name] =earlier[Name] ), [Dept Count],,desc,dense)
new Dept = maxx(filter(table,[name] =earlier[Name] && [Dept Rank] =1),[Department])
@JiriS , All three as new columns
Dept Count =
countx(filter(table,[name] =earlier[Name] && [Department]=earlier([department)),[Department])
Dept Rank = rankx(filter(table,[name] =earlier[Name] ), [Dept Count],,desc,dense)
new Dept = maxx(filter(table,[name] =earlier[Name] && [Dept Rank] =1),[Department])
It works. Thank you!!
User | Count |
---|---|
131 | |
108 | |
101 | |
67 | |
64 |
User | Count |
---|---|
137 | |
115 | |
102 | |
71 | |
61 |