cancel
Showing results for
Search instead for
Did you mean:
Helper V

## Cumulate order income values per order

Out of my huge order list I would like to visualize only those with an total order amount > 100.000 Euro. The problem that I am now facing is that the original list has been setup according to the transaction date, i.e. the date when something has been changed to an order. Each line of this list is showing up the order number.

An example: Order 001000815 was placed on January 10, 2020 with a value of 750.000 Euro.

On January 14, 2020 the order will be adjusted by additional 50.000 Euro.

On February 03, 2020 the order again will be adjusted, now by additional 200.000 Euro.

On March 01, 2020 some items will be cancelled, meaning a reduction of 300.000 Euro.

In consequence, the total order value of order 001000815 should refer to 700.000 Euro.

When I now set a filter for all orders > 100.000 Euro, the illustrated value of this order will be 950.000 Euro, as both the changes of additional 50 k€ and the reduced 300 k€ will be ignored.

How do I need to setup a measure? I think it just needs two parameters:

1. Amount EUR

2. Order No

So I started to adjust an existing measure, but this did not work…

**bleep**. EUR per order = CALCULATE( SUM('IObOL new (incl K Group)'[Amount EUR]);

But how to continue??? I hope someone can help me…

1 ACCEPTED SOLUTION
Community Support

I assumed reduction of 300000 is recorded as -300000, try this:

measure = CALCULATE(SUM('IObOL new (incl K Group)'[Amount EUR]),
filter(All('IObOL new (incl K Group)'),sumx(filter('IObOL new (incl K Group)', earlier('IObOL new (incl K Group)'[date])<='IObOL new (incl K Group)'[date]),1))

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

2 REPLIES 2
Community Support

I assumed reduction of 300000 is recorded as -300000, try this:

measure = CALCULATE(SUM('IObOL new (incl K Group)'[Amount EUR]),
filter(All('IObOL new (incl K Group)'),sumx(filter('IObOL new (incl K Group)', earlier('IObOL new (incl K Group)'[date])<='IObOL new (incl K Group)'[date]),1))

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

Super User

You can Create a cumulative measure like this with date Calendar

Cumm Amount = CALCULATE(SUM('IObOL new (incl K Group)'[Amount EUR]),filter(date,date[date] <=maxx(date,date[date])))

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/

## Helpful resources

Announcements

#### 2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

#### Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

#### Business Application LATAM Summit 2023

Join the biggest FREE Business Applications Event in LATAM this February.

#### Global Power Platform Bootcamp

In this bootcamp we will deep-dive into Microsoft’s Power Platform stack with hands-on sessions and labs, delivered to you by experts and community leaders.

Top Solution Authors
Top Kudoed Authors