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

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.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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