Forum Discussion
Alexp81
3 years agoNew Member
Dax Calulation Help
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, se...
- 3 years ago
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!
AlanFredes
3 years agoResolver IV
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!
- Alexp813 years agoNew Member
Hi Alan, thanks for the reply, thats where i had got to in my mind, hoped i had missed something.
Thank you
Alex