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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Frequent Visitor

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. 

Community Support
Community Support

Hi @GenisGomez ,


Please provide some example data and expect result.


Best Regards

Community Support Team _ chenwu zhu

Hi @v-chenwuz-msft,

Here's an example of what i want to achieve 


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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.


Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.