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
Kwokster
Frequent Visitor

Show outstanding quantity per order and item number

Hi All,

 

Did already some researched but did not find a solution.

 

I want to show/calculate per order the outstanding quantity of each item number.

The challenge here is the order and item number can exist of 1 or 2 positions in the source file.

You can find here an example of the desired solution.

Naamloos.png

 

Any help will be appreciated.

 

Kind regards,

 

Kwokster

 

 

 

 

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @Kwokster ,

 

Try to create a measure like so:

 

Open = 
VAR Ordered_ =
    AVERAGE ( 'Table'[Ordered] )
VAR Received_ =
    SUM ( 'Table'[Received] )
RETURN
    Ordered_ - Received_

 

ORDER2.PNG

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Icey
Community Support
Community Support

Hi @Kwokster ,

 

Try to create a measure like so:

 

Open = 
VAR Ordered_ =
    AVERAGE ( 'Table'[Ordered] )
VAR Received_ =
    SUM ( 'Table'[Received] )
RETURN
    Ordered_ - Received_

 

ORDER2.PNG

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Kwokster
Frequent Visitor

@Icey Got this code to work, big thanks!

az38
Community Champion
Community Champion

Hi @Kwokster 

try a measure like

Measure = 
var _totReceived = CALCULATE(SUM(Table[Received]), ALLEXCEPT(Table, Table[Order nr.], Table[Item number]) )
var _totOrdered = CALCULATE(AVERAGE(Table[Ordered]), ALLEXCEPT(Table, Table[Order nr.], Table[Item number]) )

RETURN
_totOrdered - _totReceived 

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
Kwokster
Frequent Visitor

@az38 I will try your solution, thanks!

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! Prices go up Feb. 11th.

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.