Forum Discussion
multiple rank columns in matrix table
Hi all, I would need to have an extra rank column for each criteria that is selected in the criteria filter.
Is that possible
Many thanks
David
Hi ADP007 ,
We can create a calculate column and a measure to meet your requirement.
1. Create a rank column.
AVG. RANK = RANKX( FILTER( mScoreData, [CATEGORY]=EARLIER([CATEGORY]) &&[CRITERIA]=EARLIER([CRITERIA]) ), mScoreData[SCORE],,DESC,Dense)2. Then create an average measure.
AVGRank = var _total = CALCULATE( SUM(mScoreData[AVG. RANK]), FILTER( ALLSELECTED(mScoreData), [CATEGORY]=MAX([CATEGORY]) &&[CATEGORY2]=MAX([CATEGORY2]) &&[MEDIA]=MAX([MEDIA]) &&[LABEL]=MAX([LABEL]))) var _count = CALCULATE(DISTINCTCOUNT(mScoreData[CRITERIA]),ALLSELECTED(mScoreData)) return DIVIDE(_total,_count)If you have any question, please kindly ask here and we will try to resolve it.
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
BTW, pbix as attached.
10 Replies
- amitchandak
Super User
ADP007 , Not very clear. You can not add a column when the filter is applied, You can change Rank calculation based on.
Please provide your feedback comments and advice for new videos
Tutorial Series Dax Vs SQL Direct Query PBI Tips
Appreciate your Kudos.- ADP007
Helper IV
amitchandak, thanks for your time. When I select items from the criteria filter the dimension gets added to the matrix.
In my image I have 4 criterias selected and thus 4 columns in my matrix table. I would like to have an extra column in the matrix for each dimension with the ranking. Something like this but of course dynamically. Hope this helps.
CATEGORY SECTOR BRAND MEDIA Convincing Rank Draws attention Rank Inspiring Rank Likeability Rank - v-zhenbw-msft
Community Support
Hi ADP007 ,
We can create a measure and put it in Values to meet your requirement.
Rank = RANKX ( FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Media] = MAX ( 'Table'[Media] ) ), CALCULATE ( SUM ( 'Table'[value] ) ), , ASC, DENSE )If it doesn’t meet your requirement, could you please provide a mockup sample based on fake data?
It will be helpful if you can show us the exact expected result based on the tables.
Please upload your files to OneDrive For Business and share the link here. Please don't contain any Confidential Information or Real data in your reply.
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
BTW, pbix as attached.
- v-zhenbw-msft
Community Support
Hi ADP007 ,
Glad to hear that you have solved the issue.
Please kindly mark your reply as a solution to help others find it more quickly. Thanks!
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.