cancel
Showing results for
Did you mean:

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Regular Visitor

## Finding the top manufacturer by total sales

Hello everyone,

I want to get the top manufacturer (the actual name) by total sales. I need a metric Top Manufacturer by Sales that I can use as a KPI in my dashboard.

I have created the metric

Rank Manufacturer by Sales =
RANKX(ALL('Dim Product'[Manufacturer]),'Fact Sales'[Total Revenue €]) and it is working well.
But then I cannot extract the name corresponding to the rank 1 manufacturer in this metric.
Can someone help?
1 ACCEPTED SOLUTION
Super User

Hi,

I am not sure how your datamodel looks like, but I tried to create a sample pbix file like below.

Please check the below picture and the attached pbix file.

I hope the below can provide some ideas on how to create a solution for your datamodel.

Rank manufacturer by sales: =
RANK (
SKIP,
ALL ( 'Dim Product'[Manufacturer] ),
ORDERBY ( CALCULATE ( SUM ( 'Fact Sales'[Revenue] ) ), DESC )
)

Rank 1 manufacturer: =
CONCATENATEX (
FILTER (
ALL ( 'Dim Product'[Manufacturer] ),
[Rank manufacturer by sales:] = 1
),
'Dim Product'[Manufacturer],
", "
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.

Super User

Hi,

I am not sure how your datamodel looks like, but I tried to create a sample pbix file like below.

Please check the below picture and the attached pbix file.

I hope the below can provide some ideas on how to create a solution for your datamodel.

Rank manufacturer by sales: =
RANK (
SKIP,
ALL ( 'Dim Product'[Manufacturer] ),
ORDERBY ( CALCULATE ( SUM ( 'Fact Sales'[Revenue] ) ), DESC )
)

Rank 1 manufacturer: =
CONCATENATEX (
FILTER (
ALL ( 'Dim Product'[Manufacturer] ),
[Rank manufacturer by sales:] = 1
),
'Dim Product'[Manufacturer],
", "
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Power BI Monthly Update - June 2024

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

#### New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

Top Solution Authors
Top Kudoed Authors