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

Cumulate order income values per order

@v-lid-msft :

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
V-pazhen-msft
Community Support
Community Support

@Orstenpowers 

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.

View solution in original post

2 REPLIES 2
V-pazhen-msft
Community Support
Community Support

@Orstenpowers 

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.

amitchandak
Super User
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/



Learn Power BI - Full Course with Dec-2022, with new DAX functions like Window, Index, Offset !!
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!
Formatted Profit and Loss Statement with empty lines

Helpful resources

Announcements
Carousel_PBI_Wave1

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.

Power BI Summit Carousel 2

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!

Thank you 2022 Review

2022 Monthly Feature Releases

We had a great 2022 with a ton of feature releases to help you drive a data culture.