Forum Discussion
Rank using multiple attribute columns and 1 value column
- 6 years ago
Hi Anonymous
Create a calcualted column,
month-year = FORMAT([Day],"Mmmm YYYY")Then create two measures
sum = CALCULATE ( SUM ( 'Table 3'[Value] ), FILTER ( ALLSELECTED ( 'Table 3' ), 'Table 3'[Name] = MAX ( 'Table 3'[Name] ) && 'Table 3'[month-year] = MAX ( 'Table 3'[month-year] ) && 'Table 3'[Group] = MAX ( 'Table 3'[Group] ) ) ) rank = RANKX ( FILTER ( ALLSELECTED ( 'Table 3' ), 'Table 3'[month-year] = MAX ( 'Table 3'[month-year] ) && 'Table 3'[Name] = MAX ( 'Table 3'[Name] ) ), [sum], , DESC, DENSE )Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous Please create a calculated column
Column =
VAR _month ='Table'[Month]
RETURN RANKX(FILTER('Table','Table'[Month]=_month),'Table'[Value],,,Dense)- Anonymous6 years agoNot applicable
Thank you vimal_parmar,
I now have ranking based on a month, but i am missing it on name and group level. How can i add other dimensions?
Rank Name Group Month What I have now What I need N1 G1 M1 202 1 N1 G2 M1 213 2 N1 G1 M2 215 1 Regards
Filarap
- v-juanli-msft6 years ago
Community Support
Hi Anonymous
Create two measures
Measure = SUM('Table 2'[Value]) Measure 2 = RANKX ( FILTER ( ALLSELECTED ( 'Table 2' ), 'Table 2'[Month] = MAX ( 'Table 2'[Month] ) && 'Table 2'[Name] = MAX ( 'Table 2'[Name] ) ), [Measure], , DESC, DENSE )Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.- Anonymous6 years agoNot applicable
Hi Maggie and thank you,
Not sure if I did something wrong or this is due to data formats i have.
This is result i got (i have also changed format to match what i have):
Format is 1st day of month Measure 2 Measure 1 Name Group Month Rank Sum% John Smith (IDC123456) Name_of_the_group one October 19 1 202 John Smith (IDC123456) Name_of_the_group one November 19 1 8.85 John Smith (IDC123456) Name_of_the_group two November 19 1 38.22 This is rank functon used:
rank = RANKX (FILTER (ALLSELECTED ('table name'),'table name'[Month] = MAX('table name'[Month])&& 'table name'[Name]= MAX ('table name'[Name])),[sum%],,DESC,DENSE)What did i do wrong?RegardsFilarap