Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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 | Outcome | PointEstimate | Rank |
Study 1 | Overall | Response >=90% | 1.6 | 2 |
Study 1 | Overall | Constipation | 3.4 | 5 |
Study 1 | Overall | CEIs | 2.0 | 3 |
Study 1 | Stage III | Infections | 2.1 | 4 |
Study 1 | Stage IV | Hematologic AE | 1.0 | 1 |
Study 2 | Stage IV | Diarrhea | 3.5 | 6 |
Study 2 | Overall | Hypertension | 3.5 | 7 |
Study 2 | BRCA+ | Nausea | 3.6 | 8 |
Study 2 | BRCA- | Anemia | 3.8 | 10 |
Study 2 | Stage III | Hematologic AE | 3.7 | 9 |
Study 2 | Stage III | Hematologic AE | 3.9 | 11 |
Solved! Go to Solution.
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.
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.
Thank you.
@NiteshS
Please check out my video on the same topic: https://youtu.be/8aDSztj9pmU
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
8 | |
8 | |
6 |
User | Count |
---|---|
14 | |
13 | |
11 | |
9 | |
9 |