Forum Discussion
Pavithra_sarava
3 years agoRegular 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?
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])) )
3 Replies
- johnt75
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 ) )- Pavithra_saravaRegular Visitor
Hi,
sorry it's not working
- lukiz84
Memorable Member
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])) )