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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Display Top 1 customer on Card Visual

Hi all!

 

So I have a table 'Product' with columns:  [Country], [Customer Name], [Product Category], [Prodcut Name], [Prodcut UPC]

And based on this, I created a calculated column [Unit Count] = DISTINCTCOUNT(Product[Prodcut UPC])

 

Now I need to create a card visual to display the top 1 customer with all the cross-filtering on the page, aka the customer bought the most units disregard the price and product type, and here's what I tried: 

 

[Top Customer] = 

CALCULATE(SELECTEDVALUE(asset[Customer Name]),
TOPN( 1, ALL(Product), [UnitCount],DESC ))
 
However, it's being calculated across each row and can't give me the top 1 customer name. I also tried FIRSTNONBLANK and couldn't get it to work. What am I missing here? please help! Thank you so much!! 

 

1 ACCEPTED SOLUTION
v-lid-msft
Community Support
Community Support

Hi @Anonymous ,

 

If you want the count can be filtered by  all the cross-filtering on the page. We can also use the following measure to meet your requirement:

 

TopCustomer =
MAXX (
    TOPN (
        1,
        SUMMARIZE (
            Product,
            Product[Customer Name],
            "Count", DISTINCTCOUNT ( Product[Prodcut UPC] )
        ),
        [Count], DESC
    ),
    [Customer Name]
)

 


Best regards,

 

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

View solution in original post

3 REPLIES 3
v-lid-msft
Community Support
Community Support

Hi @Anonymous ,

 

How about the result after you follow the suggestions mentioned in my original post?Could you please provide more details about it If it doesn't meet your requirement?


Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-lid-msft
Community Support
Community Support

Hi @Anonymous ,

 

If you want the count can be filtered by  all the cross-filtering on the page. We can also use the following measure to meet your requirement:

 

TopCustomer =
MAXX (
    TOPN (
        1,
        SUMMARIZE (
            Product,
            Product[Customer Name],
            "Count", DISTINCTCOUNT ( Product[Prodcut UPC] )
        ),
        [Count], DESC
    ),
    [Customer Name]
)

 


Best regards,

 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
amitchandak
Super User
Super User

Put Customer name on card. In visual filter drag filter Top 1 based on [UnitCount].

Refer , Brand dragged as measure and again dragged to filter and Top 1 has been used.

Screenshot 2020-02-01 00.28.27.png

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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