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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
DuskyLeaf
Frequent Visitor

filter visual dates over the date splicer for last three months

I am looking to show total hours for the last three months for a specific department.

I have matrix visual that totals hrs over the splicer date range.

I have hrs values that I need to display on the visual outside the splicer dates.

I have created a Auto Calendar date table (make as date table) and set up a relationship between the Calendar Date table to a start date on my primary hrs value table. Both date columns are set to DATE:dd/mm/yyyy

 

Using the measure below does not filter the values for the previous month.

1mths =
CALCULATE(
    SUM('msnfp_participationschedule'[Time Worked]),
    DATEADD ( 'sCALENDAR'[Date], -1, MONTH )
)



DuskyLeaf_0-1713543860632.png

The formula for a standard table is not filtering by the date correctly. The totals should be 15 and 20hrs

DuskyLeaf_1-1713543965996.png

DuskyLeaf_3-1713544292309.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @DuskyLeaf,

It seems like you are working with direct query connection mode tables, I'd like to suggest you use date function to manually define the filter range instead of use time intelligence functions: (time intelligence functions are based on the hidden calendar table, direct query connection mode will affect it)

previous Month =
VAR currDate =
    MAX ( 'sCALENDAR'[Date] )
RETURN
    CALCULATE (
        SUM ( 'msnfp_participationschedule'[Time Worked] ),
        FILTER (
            ALLSELECTED ( 'msnfp_participationschedule' ),
            [Date]
                >= DATE ( YEAR ( currDate ), MONTH ( currDate ) - 1, DAY ( currDate ) )
                && [Date] <= currDate
        )
    )

Regards,
Xiaoxin Sheng

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @DuskyLeaf,

It seems like you are working with direct query connection mode tables, I'd like to suggest you use date function to manually define the filter range instead of use time intelligence functions: (time intelligence functions are based on the hidden calendar table, direct query connection mode will affect it)

previous Month =
VAR currDate =
    MAX ( 'sCALENDAR'[Date] )
RETURN
    CALCULATE (
        SUM ( 'msnfp_participationschedule'[Time Worked] ),
        FILTER (
            ALLSELECTED ( 'msnfp_participationschedule' ),
            [Date]
                >= DATE ( YEAR ( currDate ), MONTH ( currDate ) - 1, DAY ( currDate ) )
                && [Date] <= currDate
        )
    )

Regards,
Xiaoxin Sheng

DuskyLeaf
Frequent Visitor

... the tables are DirectQuery except sCalendar Table which is import

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors