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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.