Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
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
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
User | Count |
---|---|
69 | |
35 | |
21 | |
18 | |
15 |
User | Count |
---|---|
127 | |
29 | |
27 | |
24 | |
22 |