Forum Discussion
Ranking value column in a table based on multiple other column
- 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.
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 _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.