Forum Discussion
Mapping one account with two sales rep
- Anonymous9 years ago
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.
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
- Anonymous9 years agoNot applicable
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.
- rbrechet9 years ago
Helper I
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) ....
- Anonymous9 years agoNot applicable
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: