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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Maahmohammed
Helper I
Helper I

How to udentify invoice No. that doesn't include a specific product?

Dears,

I have some orders, some of them are charged with delivery charge & others are free. We add the delivery charge as an item with a code No. (11), so in case the order is charged with delivery, we add item No. (11) & in case it's free of charge, we don't add that item.

I'd like to have 2 separate tables as per the below:

Data tables

Maahmohammed_0-1726676861113.png

The expected outcome tables are:

Maahmohammed_1-1726676900350.png

 

Maahmohammed_2-1726676915707.png

 

 

1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

You can write a measure to sum the total price

 

Total Invoice Cost = SUM ( YourTable[Price] )

 

Then a mesure to calculate the delivery cost.

 

Delivery Cost = CALCULATE ( [Total Invoice Cost], YourTable[Procuct_ID] = "11" )

 

Put those field in the table with the invoice numbers and set the first one to [Delivery Cost] is not blank and the second to [Delivery Cost] is blank

jdbuchanan71_1-1726678663152.png

 

 

View solution in original post

1 REPLY 1
jdbuchanan71
Super User
Super User

You can write a measure to sum the total price

 

Total Invoice Cost = SUM ( YourTable[Price] )

 

Then a mesure to calculate the delivery cost.

 

Delivery Cost = CALCULATE ( [Total Invoice Cost], YourTable[Procuct_ID] = "11" )

 

Put those field in the table with the invoice numbers and set the first one to [Delivery Cost] is not blank and the second to [Delivery Cost] is blank

jdbuchanan71_1-1726678663152.png

 

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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