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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Get the name or the Top product from my count on sales


 

Hi I have 

the ProductcountMeasure  := 

CALCULATE( DISTINCTCOUNT( 'Sales'[SalesOrderNumber]) , 'Sales'[SalesOrderNumber] <> BLANK() )
then I have the the
dimProduct with the follow attributes (ProductCode, ProductDescription)
How can I get the ProductDescription of the product that appears on the top of my codes that appears in my Sales fact
I have the RankProduct := 

RANKX(ALL(Part[PartNumber]),[08 Count of SO Number])
That I can present in a Matrix.
But I would like to present in a card the first product of my rank

 

Thanks

Peter

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

If you want to show ProductDescription of the product that appears on the top of your codes in card visual. I think you can add [RankProduct] in visual level filter and set it to show items when value = 1. Then you will get the ProductDescription of the product whose Rank =1.

 

Best Regards,
Rico Zhou

 

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

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,

 

If you want to show ProductDescription of the product that appears on the top of your codes in card visual. I think you can add [RankProduct] in visual level filter and set it to show items when value = 1. Then you will get the ProductDescription of the product whose Rank =1.

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

rbriga
Impactful Individual
Impactful Individual

You may use FIRSTNONBLANK with TOPN. 

See this post.

-------------------------
Data analyst by day, hockey goalie by night.
Did I help? Then please hit that "kudos" or "accept as a solution" button!

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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