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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

default calendard date not working

I have created a slicer using this logic, the requirement is  to have a detault  date that shows today + 30 days. however my logic only shows  5/2/2023 instead of 6/5/2023 . does anyone know what i need to tweak on my formular to get it to work 

CustomDateFilter = UNION(ADDCOLUMNS(DATESBETWEEN(sales[date],TODAY(),TODAY()+30),"Type","Default"),
     ADDCOLUMNS(CALENDAR(MIN(sales[date]),MAX(sales[date])),"Type","Custom"))
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

Please confirm there is the related date in "sales[date]" column firstly, then try below dax formula:

CustomDateFilter =
UNION (
    ADDCOLUMNS (
        DATESBETWEEN ( sales[date], TODAY (), TODAY () + 30 ),
        "Type", "Default"
    ),
    ADDCOLUMNS (
        CALENDAR ( FIRSTDATE ( sales[date] ), LASTDATE ( sales[date] ) ),
        "Type", "Custom"
    )
)

 

Best regards,
Community Support Team_Binbin Yu
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

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,

Please confirm there is the related date in "sales[date]" column firstly, then try below dax formula:

CustomDateFilter =
UNION (
    ADDCOLUMNS (
        DATESBETWEEN ( sales[date], TODAY (), TODAY () + 30 ),
        "Type", "Default"
    ),
    ADDCOLUMNS (
        CALENDAR ( FIRSTDATE ( sales[date] ), LASTDATE ( sales[date] ) ),
        "Type", "Custom"
    )
)

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

This is closer to what i want , only issue is i am getting records that have blank sales date and i wnated to know if there is a way to modofiy that query to  not bring  in rows that have blank date?

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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