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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric 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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.