Product Name as Measure for Highest Sales Product

Hello Fellow Power BI Users -

In your excellent video 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

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