Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I need to create a visual or table like the following:
I have an activities table with multiple columns, including:
Date
Person
activityid
Plus a date table with week end dates in it linked to the above date.
Now it is easy to list number of activities per person, but to show the TOP N, only works on the total, not on each week's totals.
To get a table to similar to above:
Do I need a summary table?
Also how do you list multiple people on one line?
Any ideas would be great for how I can get the top 3 for each given week.
Solved! Go to Solution.
You can use TOPN and CONCATENATEX to get your result. For example,
Top Performers =
VAR vTop3 =
TOPN (
3,
VALUES ( Table[Person] ),
CALCULATE (
DISTINCTCOUNT ( Table[ActivityID] )
), DESC
)
RETURN
CONCATENATEX (
vTop3,
Table[Person],
", "
)
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Hi,
Share the raw dataset in a format that can be pasted in an Excel workbook. Alternatively, share the link from where i can download your PBI file.
You can use TOPN and CONCATENATEX to get your result. For example,
Top Performers =
VAR vTop3 =
TOPN (
3,
VALUES ( Table[Person] ),
CALCULATE (
DISTINCTCOUNT ( Table[ActivityID] )
), DESC
)
RETURN
CONCATENATEX (
vTop3,
Table[Person],
", "
)
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Thank you Pat - that is great. Strangely though it does not list them in descending order of number of activities. The top 3 are correct though. Any ideas why it is not ordering them in the concatenation in the descending order?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
95 | |
76 | |
65 | |
51 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |