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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.