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
Anonymous
Not applicable

Filtered Year To Date doesnt SUM

Hi All,

 

I have a really simple table with two columns

 

FiscalPeriodEndDate, MonthlyTotal 

01 Jan 2019, 100

28 Feb 2019, 500

30 Mar 2019, -200

29 Apr 2019, 200

 

What id like to do is create a measure that displays a running total. I used the quick measure feature to create a year to date measure which worked fine except it displays values into the future. So i tried to edit it and filter the results so that the future dates were not displayed.  Unfortunaly my efforts have resulted in the measure no longer adding up the running total but just displaying the value for each line. 

 
BalanceAmt YTD =
TOTALYTD(
        SUM('rep ETLCashInBank'[MonthlyTotal]),
        'rep ETLCashInBank'[FiscalPeriodEndDate].[Date],
FILTER('rep ETLCashInBank', 'rep ETLCashInBank'[FiscalPeriodEndDate].[Date] <= MAX('rep ETLCashInBank'[FiscalPeriodEndDate].[Date]))
 
    )

Any help greatfully received!

 

Andy

 

 

1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

hi, @Anonymous 

Just adjust your formula as below:

BalanceAmt YTD = 
TOTALYTD (
    SUM ( 'rep ETLCashInBank'[MonthlyTotal] ),
    'rep ETLCashInBank'[FiscalPeriodEndDate],
    FILTER (
        ALLSELECTED ( 'rep ETLCashInBank' ),
        'rep ETLCashInBank'[FiscalPeriodEndDate]
            <= MAX ( 'rep ETLCashInBank'[FiscalPeriodEndDate] )
    )
)

Result:

4.JPG

Best Regards,

Lin

Community Support Team _ Lin
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

1 REPLY 1
v-lili6-msft
Community Support
Community Support

hi, @Anonymous 

Just adjust your formula as below:

BalanceAmt YTD = 
TOTALYTD (
    SUM ( 'rep ETLCashInBank'[MonthlyTotal] ),
    'rep ETLCashInBank'[FiscalPeriodEndDate],
    FILTER (
        ALLSELECTED ( 'rep ETLCashInBank' ),
        'rep ETLCashInBank'[FiscalPeriodEndDate]
            <= MAX ( 'rep ETLCashInBank'[FiscalPeriodEndDate] )
    )
)

Result:

4.JPG

Best Regards,

Lin

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

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.