cancel
Showing results for
Did you mean:

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a \$100 discount. Register Now

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://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/

Announcements

#### Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

#### Power BI Monthly Update - February 2024

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

#### Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

#### Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors
Top Kudoed Authors