Product Name as Measure for Highest Sales Product

Hello Fellow Power BI Users -

In your excellent video https://www.youtube.com/watch?v=ljAINOUt-X8 you showed an example of getting the $Sales for Top 2 Products in a table by Location using the “TOPN” in DAX calculations.

However, instead of the $Sales amount, I need to get the “Product Name” of the highest selling Product by Sales Amount as a Measure so that I can show the “Prodcut Name” in the Card visualization. I cannot figure out the DAX pattern to get this.

Can you please help.
Thanks. Regards…Adi

Hi Adi,

This is all you need for this one

Top Ranked Product = 
CALCULATE( SELECTEDVALUE( 'Product'[Product Name] ),
    TOPN( 1, ALL( 'Product' ), [Total Sales], DESC ) )

See below for results

1 Like

Hello Sam:
Thank you so much for the prompt reply.
This is great and it works and also in my application.
Could not figure out the DAX pattern for obtaining the name.
So glad I joined Enterprise DNA.
Best regards….Adi

1 Like

Hi @sam.mckay
Thank for the solution, I used it in the Power BI Accelerator Week 4.