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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

Calculating state of order based on it's lines

Hello everyone, im quite new to power BI and i found a problem i cant solve by myself.

Basically, i get all my data from a single Direct query from SQL server, the data is order lines with the total quantity of each item, the quantity of the item that has already been cut, the quantity of the item that has already been processed and the quantity of the item that has been packed per line. 

In power BI I created a table that groups the lines by orders, and now i want to use the sum of the different quantities to get a "state", for example, if the cut quantity is less than the total quantity, the state column would show "Waiting for cut", the same with the other quantities. I know how to do this with order lines but no idea how to do it with orders.

Any help would be appreciated. 

2 REPLIES 2
v-chenwuz-msft
Community Support
Community Support

Hi @Anonymous ,

 

Please provide some example data and expect result.

 

Best Regards

Community Support Team _ chenwu zhu

Anonymous
Not applicable

Hi @v-chenwuz-msft,

Here's an example of what i want to achieve 

GenisGomez_0-1665062073476.png

This is obviously a very small example becasue there would be many different possibilities, but as you can see, i wanna display in the status the first part of the process that doesn't equal the total quantity.

Thank you.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.