Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Getting Invoice Total of specific line item

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 NumberProduct codeAmount
inv 123prod 1100
inv 123prod 2250
inv 123prod 3200
inv 123prod 2250
inv 123prod 2250
inv 123prod 4150
   
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

1 ACCEPTED SOLUTION

Hi @Anonymous ,

Based on my test, you could create below measure:

Total amount = CALCULATE(SUM(Table1[Amount]),ALL(Table1))

Result:

1.PNG

You could also download the pbix file to have a view.

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-danhe-msft
Employee
Employee

Hi @Anonymous ,

Waht is your desired result? If I select Prod 2, it will show 750:

1.PNG

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

The desired result is 1200 for these invoices. This series is just one of many.
I want to know the sun for all of Inv123 when I select just prod 2.

I’m trying to determine the total spend if an invoice with many line items contained one particular line (prod 2)

Hi @Anonymous ,

Based on my test, you could create below measure:

Total amount = CALCULATE(SUM(Table1[Amount]),ALL(Table1))

Result:

1.PNG

You could also download the pbix file to have a view.

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Ashish_Mathur
Super User
Super User

Hi,

 

Shouldn't the result e 250*3=750? 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.