Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Dear PowerBI Community,
I have the following question, hopefully you can help me with this.
I have a table for each product sold. It looks like this:
Product | Region | Main Seller | Support Seller |
1 | West | Alex | Pedro |
2 | East | Stephanie | Alex |
3 | North | Pedro | |
4 | North | Stephanie | Pedro |
5 | South | Pedro | Alex |
6 | South | Pedro | Alex |
7 | South | Alex | Stephanie |
I would like to calculate an rank the top seller combinations, independent of if they supported during the sale, or if they were the main seller.
The desired result would be displayed on a table with a ranking.
In this example, the combination "Alex and Pedro" would appear 3 times, and ranked as first. "Stephanie and Alex" would be ranked second, and the rest would follow with only one count ("Stephanie and Alex").
I don´t wish to display the sales, where there is no support seller, but I believe I can filter that out later through the filter pane and setting "Support Seller" to not allowing blanks.
Thank you for your help in advance!
Regards,
RobGer
Solved! Go to Solution.
Stange request, anyhow...change the Seller Combination as following.
Proud to be a Super User!
Interesting, this seemly easy question turns out to be brain teaser.
Rnk =
RANKX(
ALLSELECTED( PAIR[Product] ),
VAR __prod = CALCULATETABLE( VALUES( PAIR[Product] ), ALLEXCEPT( PAIR, PAIR[Product] ) )
VAR __main = CALCULATE( MAX( PAIR[Main Seller] ), ALL(), __prod )
VAR __sup = CALCULATE( MAX( PAIR[Support Seller] ), ALL(), __prod )
RETURN
CALCULATE(
COUNTROWS( PAIR ),
TREATAS( { ( __main, __sup ) }, PAIR[Main Seller], PAIR[Support Seller] )
)
+ CALCULATE(
COUNTROWS( PAIR ),
ALL( PAIR[Product] ),
TREATAS( { ( __sup, __main ) }, PAIR[Main Seller], PAIR[Support Seller] )
),
COUNTROWS( PAIR )
+ CALCULATE(
COUNTROWS( PAIR ),
TREATAS(
{ ( MAX( PAIR[Support Seller] ), MAX( PAIR[Main Seller] ) ) },
PAIR[Main Seller],
PAIR[Support Seller]
)
),
,
DENSE
)
Expertise = List.Accumulate( {Days as from Today}, {Skills and Knowledge}, (Current, Everyday) => Current & Day.LearnAndPractise(Everyday) ) |
Hi,
Stange request, anyhow...change the Seller Combination as following.
Proud to be a Super User!
Hi @RobGer
Based on your sample dataset, I would create 1 calculated column and 2 measures.
If I answered your question, please mark this thread as accepted.
Follow me on LinkedIn:
https://www.linkedin.com/in/mustafa-ali-70133451/
Proud to be a Super User!
Hi @amustafa ,
this is looking good, I would need the combinations to be added together, in this case, "Pedro and Alex" would count the same as "Alex and Pedro". I don´t know if there is a feasible solution that would allow it.
Hi,
Hi @olgad ,
This is looking in the right direction, would it be possible to fuse together the repeated seller combinations? In your example, "Alex and Dana" and "Dana and Alex" would be displayed together (as either "Alex and Dana" or "Dana and Alex") and the "Sales Amount" would be added together, too.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
61 | |
61 | |
55 | |
38 | |
27 |
User | Count |
---|---|
83 | |
61 | |
45 | |
41 | |
39 |