I am using the below DAX expression
City with Highest Sales but lowest profit = LOOKUPVALUE('Orders'[City], 'Orders'[Profit], Min('Orders'[Profit]), 'Orders'[Sales], Max('Orders'[Sales]))
but did not get anything. Please correct me if I am wrong here.
Go to Solution.
You can use this MEASURE
TOPN ( 1, FILTER ( Orders, Orders[Country] = "India" ), [Profit], ASC ),
View solution in original post
I believe Your formula will only fetch a city when a particular city has both Maximum Sales and Minimum Profit out of all Citiies
Otherwise it will return BLANK
So if your data looks like this...your result would be City E
But with following table the result would be blank as the City with highest sales doesnot have minimum profit
So if I want in India what is city name having lowest profit? and have used below query:
City with lowest profit in India = LOOKUPVALUE('Orders'[City], 'Orders'[Profit], Min('Orders'[Profit]), 'Orders'[Country],'India')
but I am getting error that table name of 'India' cannot found.
Kudos to you if you earned one of these! Check your inbox for a notification.
Learn about the award-winning innovation that was implemented across Microsoft’s Business Applications Communities.
Find out where you can attend!