Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi guys,
Could you help me to solve to solve this issue. I have spent more than one day on it and I still have't found any solution.
Within a commercial team, I need for each sales manager to have the product most sold compared to the total products sold.
Here is an example of the table
Result, for all the period should be:
Obviously, I should be able to have this information for all the period selected...
If I choose, only March, the result should be:
Thanks for your help !
Solved! Go to Solution.
Hi @Anonymous ,
Create a measure like this and apply it to visual level filter.
Measure 2 =
VAR best_product_1 =
FIRSTNONBLANK (
TOPN ( 1, ALL ( 'Table'[Product] ), [qty of best product], DESC ),
1
)
RETURN
IF ( MAX ( 'Table'[Product] ) = best_product_1, 1 )total sales = CALCULATE(SUM('Table'[Quantity]),ALL('Table'[Product]))_% = DIVIDE([qty of best product],[total sales])
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , Try measure like
product Rank = RANKX(all(Table[product]),[Quantity])
TOP Quantity = sumx(filter(VALUES(Table[product]),[product Rank]=1),sum(Table[Quantity]))
TOP product = sumx(filter(VALUES(Table[product]),[product Rank]=1),max(Table([product]) ))
Thanks for your quick answer.
I do not manage to appy your rankx formula: is there not any missing information within your formula (RANKX(all(Table[product]),[Quantity]) )?
Thanks for your help.
Hi @Anonymous ,
Create a measure like this and apply it to visual level filter.
Measure 2 =
VAR best_product_1 =
FIRSTNONBLANK (
TOPN ( 1, ALL ( 'Table'[Product] ), [qty of best product], DESC ),
1
)
RETURN
IF ( MAX ( 'Table'[Product] ) = best_product_1, 1 )total sales = CALCULATE(SUM('Table'[Quantity]),ALL('Table'[Product]))_% = DIVIDE([qty of best product],[total sales])
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.