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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors