Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hello dear community.
I am facing the below challenge:
I am trying to map salesforce territory with my sales data in order to follow up sales representative performance.
This is normally simple but not if two sales representative share one account (one has 40% sales the other 60%).
Do someone has any clue about how to create formula to link sales % split with sales data ?
Many thanks
Solved! Go to Solution.
Alright, so you make a new column in fact table called rep key. The DAX formula looks like this:
Repkey = 'Fact1 Table'[Code]&" "&'Fact1 Table'[Sales rep]
You make a similar column in your rep table:
Repkey = 'Rep Table'[code]&" "&'Rep Table'[Sales rep]
Then you create a relationship between fact table and rep table with these columns.
Then you create a calculated column with this DAX formula:
Total amount = 'Fact1 Table'[Amount] * RELATED('Rep Table'[Split])
Let me know how it goes. I'll gladly elaborate.
Hi @rbrechet
I come with a solution.
Try this DAX formula:
Sales pr. rep = SUMX(SUMMARIZE('Sales rep';'Sales rep'[Split]; 'Sales rep'[code];'Fact'[Amount]);'Sales rep'[Split]*'Fact'[Amount])
I didn't use your table 2. I simply made a connection between table 1 and 3 by using the account code.
Let me know if it works out.
Best,
Martin
Many thanks @Anonymous,
Working on it ... but in my dax formula I do not have option to go for Fact'[Amount]) I am only offered to choie within table 1 ....
I am probably doing smth wrong
Try making the sales pr. rep in your table 1. I called table 1 for fact and table 3 for sales rep. I'll gladly elaborate.
Hummm
I tried, still do not offer me choice.
I assume this is because I keep using table 2 for between table 1 and 3
Indeed in table 1 since for each accounts I have many lines of "product" I cannot do direct connection (duplicate lines).
Again @AnonymousI most be thanksful for you answer and patience
Sorry, I misspelled. What you do is, you forget your table 2. Then you create a connection between table 1 and table 3. Then you create a measure in table 1 with the DAX code, which I gave you. Then you should be good to go. Let me know if you insist on having table 2. Then we'll figure something out together.
Let me know how it goes. I also gladly elaborate if you want me to 🙂
Don't forget to give kudos and accept a solution, if it works out for you.
@Anonymous
I do not insist for table 2, fact is just I cannot do relation bewteeen table1/3 because of duplicate account code on both (one because of multiple sales rep per account, another one for multiple products per accounts) ....
I've been experimenting with different possible solutions, and I want to ask you; Do you have any control over the database, and how the data is stored?
The reason I'm asking is because I have specific solution in mind. The idea would be to have an index column on table 1 and then use the index column as an id column, since, as far as I understand, this table has one row for one order. The idea would then be to duplicate all the all rows for code 30. You can relate these to columns based on the sales rep name (or some id that you decide on).
Let me know if it makes sense.
See example below:
Many thanks, sound good idea.
I do have control over database.
The way it is done:
=> Since no data warehouse possible, I have daily night data extration from software to csv files.
=> My PBI is link to thoses files and been update daily (files are been merged into PBI)
If it helps
I understand. Is it possible to implement my suggestion about creating an Id column and duplicating the orders attached to account code 30?
Sure, I will implement it.
Once done, and connected, we will need to go back with your dax formula I assume
Done 🙂
Alright, so you make a new column in fact table called rep key. The DAX formula looks like this:
Repkey = 'Fact1 Table'[Code]&" "&'Fact1 Table'[Sales rep]
You make a similar column in your rep table:
Repkey = 'Rep Table'[code]&" "&'Rep Table'[Sales rep]
Then you create a relationship between fact table and rep table with these columns.
Then you create a calculated column with this DAX formula:
Total amount = 'Fact1 Table'[Amount] * RELATED('Rep Table'[Split])
Let me know how it goes. I'll gladly elaborate.
Yes it works this way !!!
Many thanks, I will deal with it now, espcially if multiples product/date lines per accounts.
Thanks for patience and solution 🙂 🙂
No problem, always feel free to contact me if you have any kind of trouble with Power BI 🙂
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
94 | |
89 | |
84 | |
77 | |
49 |
User | Count |
---|---|
143 | |
140 | |
109 | |
69 | |
55 |