Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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.