Forum Discussion
Pivot table - Use count function based on Ranking
Perhaps I misunderstood. We speak about structured table or about PivotTable ? If PivotTable what is the source for it?
For the structured table it could be like
=LET(
large5, LARGE([Rank for Week 1], SEQUENCE(5)),
ranks, INDEX( Table1, ROW() - ROW(Table1[#Headers]), {3,5,7,9}),
SUM( IF( ISNA( XMATCH(ranks, large5) ), 0, 1)) )
but that doesn't meet your manually added column. Perhaps you may give bit more details.
I am working in a pivot table. So using the Pivot table ranking feature (as explained in this https://tanducits.com/tips-and-tricks/adding-rank-in-pivot-tables-in-excel#1 for 2010 versions and above). The pivot table sources is a table within the workbook.
Hope this is the information you were after.
- SergeiBaklanOct 28, 2021Diamond Contributor
If that's PivotTable shown in initial post, when creating PivotTable add data to data model and play with explicit DAX measures instead of default implicit aggregation. Basic is here Use of RANKX in Power BI measures - SQLBI, rest depends on concrete model.
- lucioxiiiOct 29, 2021Copper ContributorThank you, that helps with getting the Ranks however, how do I go about adding the column that will evaluate the ranks and count the number of times an item has appeared in top 5 for the last 4 weeks?