Forum Discussion
DZet
3 years agoNew Member
Issue with DAX calculation (RANK) on a specific aggregation level
Hi guys! I guess my problem was solved on the Internet already at least "a few" times, but I hope you'll be understanding. Here is the thing: We have: -Sales (fact table) with OrderNo, OrderedItem...
Jayee
3 years agoResponsive Resident
Hi DZet ,
Try this not 100% sure about result if not work , can you share the .pbix file (without sensitive data) to us.
Testing =
RANKX (
FILTER (
ALL (
'Table'[OrderedItemKey],
'Table'[OrderNo],
'Table'[OrderDt],
'Table'[CustomerKey]
),
'Table'[OrderedItemKey] = MAX ( 'Table'[OrderedItemKey] )
),
TOTALYTD ( SUM ( 'Table'[Amount] ) ,'Date'[OrderDt])
)
DZet
3 years agoNew Member
Hi Jayee,
thanks for your help, but it's not correct. Item key is not important, we need to rank the sell on the Order level.
Here is the link to the pbix file: https://www.dropbox.com/s/7jp7ke7fxmpyk78/PBI%20Task.pbix?dl=0
I created a measure with your code and you can see it in the table on the left side. On the right, there is a SellRank, that I created, but doesn't work with the bottom date range properly.
Thanks in advance to anyone who could help! 🙂