Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
DeepakJadhav
New Member

Unable to write Dense Rank function

I am looking to replicate below logic in power BI but unfortunaltly not getting exact result.
(case when Upper([CASE ID]) != "NON-AUDITABLE" then
DENSERank(RowId(), "ASC", [TICKET NUMBER])
DENSERank(RowId(), "ASC", [AUDIT BUNDLES ID])
end)=1

2 REPLIES 2
DeepakJadhav
New Member

I have tried below measure but still not getting the desired result:
Calculated Column =
IF(
UPPER(YourTable[CASE ID]) <> "NON-AUDITABLE",
IF(
RANKX(
ALL(YourTable),
YourTable[TICKET NUMBER],
,
ASC,
Dense
) = 1 ||
RANKX(
ALL(YourTable),
YourTable[AUDIT BUNDLES ID],
,
ASC,
Dense
) = 1,
1,
0
),
0
)

foodd
Super User
Super User

DENSE_RANK is not a built-in function in Power BI. However, you can use RANKX instead

 

RANKX – DAX Guide

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.