Forum Discussion
NiteshS
Helper I
4 years agoRanking value column in a table based on multiple other column
Dear All, Can you please guide me in developing a DAX code to rank the "Point Estimate" column in the below table based on the other three columns? Thanks in advance. Fowmy StudyName Subgroup ...
- 4 years ago
Hi NiteshS ,
According to your description, here's my solution.
1. If based on the StudyName column, rank PointEstimate column.
Add a new column, the DAX statement is as following:
Column 1 = RANKX ( FILTER ( 'Table', 'Table'[StudyName] = EARLIER ( 'Table'[StudyName] ) ), 'Table'[PointEstimate], , DESC )2. If based on the StudyName and Subgroup column, rank PointEstimate column.
Add a new column, the DAX statement is as following:
Column 2 = RANKX ( FILTER ( 'Table', 'Table'[StudyName] = EARLIER ( 'Table'[StudyName] ) && 'Table'[Subgroup] = EARLIER ( 'Table'[Subgroup] ) ), 'Table'[PointEstimate], , DESC )3. If based on the StudyName, Subgroup and Outcome column, rank PointEstimate column.
Add a new column, the DAX statement is as following:
Column 3 = RANKX ( FILTER ( 'Table', 'Table'[StudyName] = EARLIER ( 'Table'[StudyName] ) && 'Table'[Subgroup] = EARLIER ( 'Table'[Subgroup] ) && 'Table'[Outcome] = EARLIER ( 'Table'[Outcome] ) ), 'Table'[PointEstimate], , DESC )4. Final output
Best Regards,
Community Support Team _ kalyjIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.