Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hello PBI Team,
Rankx function starts from 2 when used order is ASC. Seems the problem comes from the fact, that there is a incative relationship with the table/column that Ranking is based on. In my case, I use MS WideWorldImportersDW database and Fact.Order and Dimession.Date - active relaion Fact.Order[Order Date Key]-Dimession.Date[Date], inactive relation Fact.Order[Picked Date Key] -Dimession.Date[Date].
When inactive relationship is removed, the results are correct .
Test DAX qry:
DEFINE
MEASURE Orders[Sales Amount] = SUMX('Orders','Orders'[Quantity]*'Orders'[Unit Price])
EVALUATE
SUMMARIZECOLUMNS(
'Date'[Calendar Month Number],
TREATAS({2015},'Date'[Calendar Year]),
"@Sales Amount", [Sales Amount],
"Rank",RANKX ( ALL ( 'Date'[Calendar Month Number] ), [Sales Amount],, ASC)
)
ORDER BY [@Sales Amount] ASC
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.