How to Find the City Name in which a customer has spend maximum?

I have a data model in which i have a customer table , a location table, a product table as dimension tables and and a sales table as fact table. Sales table has Customer ID, Product ID and Location ID as foreign key along with other facts like total quantity sold etc. Suppose i have a measure known as [TOTAL SALES].
Suppose the customers have purchased from different cities. How can i find out in which city he has done maximum sales? Logic i am able to visualize…like filtering sales table for each customer then summarize the filtered sales table as per location ID and then find the maximum sales and corresponding region but i am not able to put dax for it. Any help will be appreciated. Regards

@praveer82 Your customers make transactions in multiple cities?

yes sir…they make transactions in different cities?

Hi @praveer82 ,

I create dummy example to try answering your problem.

You can fin my solution below :
Book2.xlsx (11.1 KB)
Untitled2.pbix (40.6 KB)

I hope it will help you.

Best regards,
Joaly

5 Likes

Thanks a lot sir and thanks a lot to this wonder community.

regards