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.
Hi all,
I am trying to get a simple TopN by report names. The N is a range from 1~5. Based on the frequency of the report name (i.e. count) I would like to show top N by report name.
attached sample file and a screenshot of the expected outcome.
Thanks.
Solved! Go to Solution.
Hi @H_insight ,
You can also try the following formula, refer to the following test:
Col_count =
CALCULATE ( COUNTROWS ( Data ), ALLEXCEPT ( Data, Data[Report Name] ) )
Column =
RANKX (
Data,
CALCULATE ( COUNTROWS ( Data ), ALLEXCEPT ( Data, Data[Report Name] ) ),
[Col_count],
,
DENSE
)
Put the measure formula in the filter of the table visual and set the value to not 0:
If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @H_insight ,
You can also try the following formula, refer to the following test:
Col_count =
CALCULATE ( COUNTROWS ( Data ), ALLEXCEPT ( Data, Data[Report Name] ) )
Column =
RANKX (
Data,
CALCULATE ( COUNTROWS ( Data ), ALLEXCEPT ( Data, Data[Report Name] ) ),
[Col_count],
,
DENSE
)
Put the measure formula in the filter of the table visual and set the value to not 0:
If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks @v-henryk-mstf. for sharing the solution. This is exactly what I was looking for.
@H_insight , measures like
report count = count(Table[report Name])
calculate(AverageX(Table,[report count ]),TOPN(5,allselected(Date[report Name]),[report count ],DESC), values(Date[report Name]))
refer if neeed
in place five you can use what if , if needed
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 |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |