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
Orstenpowers
Post Patron
Post Patron

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/

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.

Top Solution Authors