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

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

Reply
Pavithra_sarava
Regular Visitor

Need to find order without product without using calculated columns/tables

Hello All,

I've 2 table in my report.

 

Order table: Order ID,Order name, value, Products,etc

Order detail table: Order ID,Product name, Specification, etc

 

There's a relationship between Order & Order detail table (One to many)

I need to find number of order without products. Here I can't use calculated column or table as my source is direct query and I won't be able to do auto refresh.

Can someone suggest me how to get the desired result? 

1 ACCEPTED SOLUTION

How is an order created if there are no products? 

 

Try 

OrdersWithoutProducts =
   CALCULATE(
      COUNT(Orders[Order ID]),
      NOT(Orders[Order ID] IN VALUES('Order detail'[Order ID]))
   )

View solution in original post

3 REPLIES 3
johnt75
Super User
Super User

If you have a one-to-many relationship from orders to order details then you could use

# orders no products =
SUMX ( 'orders', IF ( ISEMPTY ( RELATEDTABLE ( 'order details' ) ), 1 ) )

Hi,

sorry it's not working

How is an order created if there are no products? 

 

Try 

OrdersWithoutProducts =
   CALCULATE(
      COUNT(Orders[Order ID]),
      NOT(Orders[Order ID] IN VALUES('Order detail'[Order ID]))
   )

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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.