Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Rck7
Helper II
Helper II

How to calculate running totals starting from a specific date to the latest date of my data table?

Hi Friends,

I have data values in my data table from dates starting from OCT 14- Latest date.  I am looking to create a measure to calculate Running totals for the values starting from Oct 15 - Latest date (excluding the year 2014) with out using any date slicers. How would I be able to do that?

Date column structure:

10-19-2017 2-21-06 PM.pngKindly, help!!!!
Thank you.

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

You can try this one:

 

I'm assuming that the column [UsageDate] is in your FACT table, and relates to the [Date] column in your CALENDAR table.  Please note that time intelligence like this will require a calendar table.  There is lots of good documentation on building a good calendar table. Try looking here, Matt Alington has made a nice table and posted it on PowerPivotPro.

 

[Running Total Measure] :=
CALCULATE (
    [Base Measure],
    //likely summing up a certain column
    FILTER (
        ALL ( CalendarTable ),
        CalendarTable[Date] >= DATE ( 2015, 1, 1 ) //Currently hardcoded to 1/1/2015, but this could be made dynamic later
            && CalendarTable[Date] <= MAX ( CalendarTable[Date] )
    )
)

Also look at PowerPivotPro's articles on the Greatest Formula In The World...GFITW.  This measure is based on that pattern.

 

Cheers,


~ Chris H

 

View solution in original post

1 REPLY 1
Anonymous
Not applicable

You can try this one:

 

I'm assuming that the column [UsageDate] is in your FACT table, and relates to the [Date] column in your CALENDAR table.  Please note that time intelligence like this will require a calendar table.  There is lots of good documentation on building a good calendar table. Try looking here, Matt Alington has made a nice table and posted it on PowerPivotPro.

 

[Running Total Measure] :=
CALCULATE (
    [Base Measure],
    //likely summing up a certain column
    FILTER (
        ALL ( CalendarTable ),
        CalendarTable[Date] >= DATE ( 2015, 1, 1 ) //Currently hardcoded to 1/1/2015, but this could be made dynamic later
            && CalendarTable[Date] <= MAX ( CalendarTable[Date] )
    )
)

Also look at PowerPivotPro's articles on the Greatest Formula In The World...GFITW.  This measure is based on that pattern.

 

Cheers,


~ Chris H

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.