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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.