You have a Power BI model that contains the following two tables:
- Sales(Sales_ID, sales_date, sales_amount, CustomerID)
- Customer(CustomerID, First_name, Last_name)
There is a relationship between Sales and Customer.
You need to create a measure to rank the customers based on their total sales amount.
Which DAX formula should you use?
A. RANKX(ALL(Sales), SUMX(RELATEDTABLE(Customer), [Sales_amount]))
B. TOPN(ALL(customer), SUMX(RELATEDTABLE(Sales), [Sales_amount]))
C. RANKX(ALL(customer), SUMX(RELATEDTABLE(Sales), [Sales_amount]))
D. RANK.EQ(Sales[sales_amount], Customer[CustomerID])
References: https://msdn.microsoft.com/query-bi/dax/rankx-function-dax
It should be answer C.
19
1