Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi, I need to make a report with the sales of each sales rep per customer together with its credit and net sales. I have two tables that looks like this
Sales rep | Customer | Credit | Date |
John | A | 10 | Yesterday |
Max | A | 20 | Today |
Sales rep | Customer | Amount |
John | A | 30 |
Max | A | 40 |
and I want a table that looks like this
Sales rep | Customer | Credit | Amount | Date |
John | A | 10 | 30 | Yesterday |
Max | A | 20 | 40 | Today |
I already created a many to many relation, but when I use the table visulaization in power bi it is duplicating The data as follows: (even if I filter the table by Sales rep)
Sales rep | Customer | Credit | Amount | Date |
Max | A | 10 | 30 | Today |
Max | A | 20 | 40 | Today |
Solved! Go to Solution.
Hi @TomMartiG ,
According to your description, here are my steps you can follow as a solution.
(1)My test data is the same as yours.
(2) We can create a calculated column.
Amount = CALCULATE(MAX('Table (2)'[Amount]),'Table (2)'[Sales rep]=EARLIER('Table'[Sales rep]))
(3) Then the result is as follows.
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
THANKS! it actually worked.
Hi @TomMartiG ,
According to your description, here are my steps you can follow as a solution.
(1)My test data is the same as yours.
(2) We can create a calculated column.
Amount = CALCULATE(MAX('Table (2)'[Amount]),'Table (2)'[Sales rep]=EARLIER('Table'[Sales rep]))
(3) Then the result is as follows.
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
102 | |
88 | |
78 | |
71 | |
69 |
User | Count |
---|---|
113 | |
99 | |
97 | |
72 | |
68 |