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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
RonaldvdH
Post Patron
Post Patron

Need help :)

Goodday guys, i need your help in correcting this formula because something is wrong and it returns an error

'The begin or enddate in the function Calendar can not be empty'

 

 
Doorlooptijd correctie Sisu in Werkdagen = VAR YourDate = if(IsBlank([Afgerond]); TODAY(); [Afgerond])
RETURN
COUNTROWS(
    FILTER(
ADDCOLUMNS(
            CALENDAR(
                [OA retour gestuurd];
                YourDate
            );
            "DayofWeek";
            WEEKDAY(
                [Date];
                2
            )
        );
        [DayofWeek] <> 6 && [DayofWeek] <> 7
    ))
 
 
1 ACCEPTED SOLUTION

@sturlaws the column [OA retour gestuurd]  is a column with date values and yes it can be BLANK and that triggered me to change the formula to this and it seems to work

 

Doorlooptijd correctie Sisu in Werkdagen = IF(Hoogbouwregistratie[OA retour gestuurd]<>BLANK();
VAR YourDate = if(IsBlank([Afgerond]); TODAY(); [Afgerond])
RETURN
COUNTROWS(
    FILTER(
ADDCOLUMNS(
            CALENDAR(
                [OA retour gestuurd];
                YourDate
            );
            "DayofWeek";
            WEEKDAY(
                [Date];
                2
            )
        );
        [DayofWeek] <> 6 && [DayofWeek] <> 7
    )))

View solution in original post

2 REPLIES 2
sturlaws
Resident Rockstar
Resident Rockstar

Hi @RonaldvdH,

I am not able to recreate your issue with a simple dataset I created. Is  [OA retour gestuurd] a measure? I guess the reason for your error is that this value is blank.

 

Cheers,
Sturla

If this post helps, then please consider Accepting it as the solution. Kudos are nice too.

@sturlaws the column [OA retour gestuurd]  is a column with date values and yes it can be BLANK and that triggered me to change the formula to this and it seems to work

 

Doorlooptijd correctie Sisu in Werkdagen = IF(Hoogbouwregistratie[OA retour gestuurd]<>BLANK();
VAR YourDate = if(IsBlank([Afgerond]); TODAY(); [Afgerond])
RETURN
COUNTROWS(
    FILTER(
ADDCOLUMNS(
            CALENDAR(
                [OA retour gestuurd];
                YourDate
            );
            "DayofWeek";
            WEEKDAY(
                [Date];
                2
            )
        );
        [DayofWeek] <> 6 && [DayofWeek] <> 7
    )))

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.