Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

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] = D...
  • v-lid-msft's avatar
    6 years ago

    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,