Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
HarishRathore
Helper II
Helper II

Top 1 customers by product with sales

Hi,

I have a data model in power pivot where I wanted top  customer per product using this measure : 

 

Top Customer Name = Maxx(TopN (1, Summarize ( Customers, Customers[Customers Name], "Vol", [Total Volume]), [Vol], DESC ), Customers[Customers Name])

 

I am getting desired result but only thing is when i am putting brand in row field and the said measure in value field then i am getting result but the moment put "Total Volume" in value field then i am getting the complete volume of that particular brand against that top outlet but I want that what is volume of that brand against that top outlet. Can you please help me in this regards????

Regards

1 ACCEPTED SOLUTION
5 REPLIES 5
v-diye-msft
Community Support
Community Support

Hi @HarishRathore 

 

If you've fixed the issue on your own please kindly share your solution. if the above posts help, please kindly mark it as a solution to help others find it more quickly.thanks!

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
PaulDBrown
Community Champion
Community Champion

@HarishRathore 

 

You can use the RANKX function for this:

Here is my sample model

Model.JPG

 

The RANKX measure to rank customers by product:

RankX Customer = RANKX(ALL(Cutsomer[Customer]); [Sum Sales]; ;DESC;Dense)

Rank by product.JPG

 

and finally visual to only show top 1 with corresponding sales:

Top 1.JPG

 

Does that work?





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Thanks for your reply but its not proving solution where I need Number 1 customers of each product and sales of that product of that Number 1 customer.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.