Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
All -
I'm working with a invoice detail report and am trying to calculate the total invoice amount if/when I isolate a single line item. The output I'm currently seeing is that the result is multiplied by the times something is repeated within a specific line item.
Here is an example:
Invoice Number | Product code | Amount |
inv 123 | prod 1 | 100 |
inv 123 | prod 2 | 250 |
inv 123 | prod 3 | 200 |
inv 123 | prod 2 | 250 |
inv 123 | prod 2 | 250 |
inv 123 | prod 4 | 150 |
Total | 1200 |
THe current error I find is that when I search for prod 2, the total amount returned is 3600. The total amount of 1200 is counted 3 times due to prod 2 repeating.
The desired outcome is when i filter/search for invoices containing prod 2, it should be 1200 in this single instance
Solved! Go to Solution.
Hi @Anonymous ,
Based on my test, you could create below measure:
Total amount = CALCULATE(SUM(Table1[Amount]),ALL(Table1))
Result:
You could also download the pbix file to have a view.
Regards,
Daniel He
Hi @Anonymous ,
Waht is your desired result? If I select Prod 2, it will show 750:
Regards,
Daniel He
Hi @Anonymous ,
Based on my test, you could create below measure:
Total amount = CALCULATE(SUM(Table1[Amount]),ALL(Table1))
Result:
You could also download the pbix file to have a view.
Regards,
Daniel He
Hi,
Shouldn't the result e 250*3=750?
User | Count |
---|---|
125 | |
106 | |
99 | |
63 | |
62 |
User | Count |
---|---|
135 | |
116 | |
101 | |
71 | |
61 |