Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Wondering if anyone has doen this before trying to do in report vs in sql where sales people share the sale if there is a second salesperon presant.
Sales Tables
Salesperson ID, salesvalue, secondsalesperson
What I am looking to try is sum the salesvalue for the second saleperson and have it attibute to the salesperson in a tableon power bi. blank when only a single sapersperson. sales person ID is linked to another table containg sales person data that does the grouping , ID is the same in primary and secondary sales
A,500,b
B,200,
A,200,
B,300,C
Expected result
SPID, Primay Sales, Secondary Sale
A,700,0
B,500,500
C,0,300
Perhaps I have missed soemthing in obvious I have managed to count the sacondary sale for the primary salesperson
Solved! Go to Solution.
Hi Alex,
I have worked with sales data like this and what did was to un-pivot the data either in SQL or Power BI Power Query to get the following structure. This also allows you to quickly toggle between what they have as a Primary or Secondary assignment.
Id | Amount | Primary/Secondary |
A | 500 | P |
B | 200 | P |
A | 200 | P |
B | 300 | P |
B | 500 | S |
C | 300 | S |
Did I answer your question? Mark my post as a solution!
Hi Alex,
I have worked with sales data like this and what did was to un-pivot the data either in SQL or Power BI Power Query to get the following structure. This also allows you to quickly toggle between what they have as a Primary or Secondary assignment.
Id | Amount | Primary/Secondary |
A | 500 | P |
B | 200 | P |
A | 200 | P |
B | 300 | P |
B | 500 | S |
C | 300 | S |
Did I answer your question? Mark my post as a solution!
Hi Alan, thanks for the reply, thats where i had got to in my mind, hoped i had missed something.
Thank you
Alex
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
12 | |
11 | |
10 | |
9 | |
8 |