Forum Discussion
Anonymous
7 years agoNot applicable
Assistance required with formulating Measures
New to Power BI and working with DAX Formulas. I'm trying to work with three formulas. The first would provide me with the customer that purchased the greatest amount of a part number during a spec...
- Anonymous7 years agoHi again, I belive your problem is that you are not using a Customer table that is related to your Sales_Analysis table like I am, and when you put that into the TOPN function it will just contain all the rows of that table. Hence, if you more than one row with the same customer name it will be duplicated. If you have a customer table then you should use that instead, or you could try to replace 'Sales_Analysis' with VALUES('Sales_Analysis'[Customer]) in the TOPN function. Best regards, Kristjan
Anonymous
7 years agoNot applicable
Top 1 cust = PATHITEM( CONCATENATEX( TOPN( 3,'Sales_Analysis',[Sales Total] ), 'Sales_Analysis'[Customer], "|", [Sales Total],DESC ), 1 // Just change the value of "1" to a "2" for the second measure and "3" for the third measure. )
Anonymous
7 years agoNot applicable
Hi again, I belive your problem is that you are not using a Customer table that is related to your Sales_Analysis table like I am, and when you put that into the TOPN function it will just contain all the rows of that table. Hence, if you more than one row with the same customer name it will be duplicated. If you have a customer table then you should use that instead, or you could try to replace 'Sales_Analysis' with VALUES('Sales_Analysis'[Customer]) in the TOPN function. Best regards, Kristjan