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
ringovski
Helper II
Helper II

Calendar include blanks

Hi,

I have a start & end date with some blanks in the rows which I would like included, I need to handle them differently in the visual layer. However the DAX calendar function says blanks are not allowed.

 

I tried adding a IF(ISBLANK()) but this returns a error saying end date must be larger than start date, so I'm out of ideas now.

Delivery Days = 
COUNTROWS (
    FILTER (
        ADDCOLUMNS (
            CALENDAR ( 
                'Toll_Shipments'[Pick Up Date],
                Toll_Shipments[Actual Delivered Date]
                  ),
            "Is Weekday",WEEKDAY([date],2)<6
            ,"Is Holiday", CONTAINS('Holiday Dates','Holiday Dates'[Dates],[Date] )
        ),
        [Is Holiday] = FALSE() 
           && [Is Weekday] = TRUE()
    )
)

 

ringovski_0-1647221293067.png

ringovski_1-1647221371756.png

โ€ƒThanks for any ideas or assistance.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@ringovski , Try like

 

Work Day = if( not(isblank([Pick Up Date])) && not(isblank([Actual Delivered Date])) , COUNTROWS(FILTER(ADDCOLUMNS(CALENDAR(Table[Pick Up Date],Table[Actual Delivered Date]),"WorkDay", if(WEEKDAY([Date],2) <6,1,0)),[WorkDay] =1)), blank())

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@ringovski , Try like

 

Work Day = if( not(isblank([Pick Up Date])) && not(isblank([Actual Delivered Date])) , COUNTROWS(FILTER(ADDCOLUMNS(CALENDAR(Table[Pick Up Date],Table[Actual Delivered Date]),"WorkDay", if(WEEKDAY([Date],2) <6,1,0)),[WorkDay] =1)), blank())

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thanks for reply should have thought that myself.

Anonymous
Not applicable

Does the code fixed your problem? I come across to have error using the code above. 

 

Appreciate your help

Helpful resources

Announcements
November Fabric Update Carousel

Fabric Monthly Update - November 2025

Check out the November 2025 Fabric 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.

Users online (25)