Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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?
Solved! Go to 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]))
)
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]))
)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |