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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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
Top Kudoed Authors