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
Kpham
Resolver I
Resolver I

Running total till today() and show this value on the future row months

 

Hi,

 

I'm trying to get the running total value on the rows of the future date till the end of the year.

I have calculated my Running total like this:

 

 

 

 

Amount to be Delivered Running Total(late) = 
                CALCULATE(
                    SUM('Month overview'[Amount To Be Delivered (€)]),
                    FILTER(ALLSELECTED('Month overview'[DLV / DLV ZRP Date]),
                    'Month overview'[DLV / DLV ZRP Date]<=MAX('Month overview'[DLV / DLV ZRP Date])
                    && 'Month overview'[DLV / DLV ZRP Date]<= TODAY()
                    ))

 

 

 

 

The Future RT column is the desired result and the screencap is just an example and doesn't match the DAX above

and I use a DimTable

@AllisonKennedy 

 

Capture.PNG

1 ACCEPTED SOLUTION
V-pazhen-msft
Community Support
Community Support

@Kpham 
What is the result of your current measure, my concern is the filter condition:  " 'Month overview'[DLV / DLV ZRP Date]<=MAX('Month overview'[DLV / DLV ZRP Date])", since you want it yearly. 

 

Try change it to the following measure: 

 

Amount to be Delivered Running Total(late) = 
                CALCULATE(
                    SUM('Month overview'[Amount To Be Delivered (€)]),
                    FILTER(ALLSELECTED('Month overview'[DLV / DLV ZRP Date]),
                    'Month overview'[DLV / DLV ZRP Date].[Year]=MAX('Month overview'[DLV / DLV ZRP Date].[Year])
                    && 'Month overview'[DLV / DLV ZRP Date]<= TODAY()
                    ))

 


Paul Zheng _ Community Support Team
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
V-pazhen-msft
Community Support
Community Support

@Kpham 
What is the result of your current measure, my concern is the filter condition:  " 'Month overview'[DLV / DLV ZRP Date]<=MAX('Month overview'[DLV / DLV ZRP Date])", since you want it yearly. 

 

Try change it to the following measure: 

 

Amount to be Delivered Running Total(late) = 
                CALCULATE(
                    SUM('Month overview'[Amount To Be Delivered (€)]),
                    FILTER(ALLSELECTED('Month overview'[DLV / DLV ZRP Date]),
                    'Month overview'[DLV / DLV ZRP Date].[Year]=MAX('Month overview'[DLV / DLV ZRP Date].[Year])
                    && 'Month overview'[DLV / DLV ZRP Date]<= TODAY()
                    ))

 


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

AllisonKennedy
Super User
Super User

I have posted on your other post, but if you use a DimDate table, it would be better to use that date in your filter as suggested by @amitchandak

Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

amitchandak
Super User
Super User

@Kpham , if you need only at year level

 

This Year = CALCULATE(sum('order'[Qty]),filter(ALL('Date'),'Date'[Year]<=max('Date'[Year])))

 

 

Try with dates, example 

 

Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(date,date[date] <=maxx(date,date[date])))
Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(date,date[date] <=max(Sales[Sales 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/

See if my webinar on Time Intelligence can help: https://community.powerbi.com/t5/Webinars-and-Video-Gallery/PowerBI-Time-Intelligence-Calendar-WTD-Y...


Appreciate your Kudos.

 

AllisonKennedy
Super User
Super User

Sorry, I don't understand your question. Is the screenshot your desired result? The column headings there don't match those in the formula you provided, so what are the column and table names you have available to use for this problem?

Also, do you have a DimDate table?

Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

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