Forum Discussion

RonaldvdH's avatar
RonaldvdH
Icon for Post Patron rankPost Patron
7 years ago

Help me understand an error in a formula

Goodevening,

 

One of my formula's (which always worked) just returned an error which i can't explaing.

Roughly translated it states that:

 

A startdate in the function 'Calendar' may not be past the enddate

 

I thought someone entered a date which was before (or past) the dates in my 'date' table but even when ive extended the range the error still stayed and im not sure how to correct it.

 

Can someone help me please ?

9 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi,

    Can you share your DAX please?

    Thanks.

    • RonaldvdH's avatar
      RonaldvdH
      Icon for Post Patron rankPost Patron

      Anonymous  sure thing, should have added it in the first place :)

       

      Doorlooptijd Schades in Werkdagen = VAR YourDate = if(IsBlank([afgehandeld]); TODAY(); [afgehandeld])
      RETURN
      COUNTROWS(
          FILTER(
              ADDCOLUMNS(
                  CALENDAR(
                      [binnengekomen];
                      YourDate
                  );
                  "DayofWeek";
                  WEEKDAY(
                      [Date];
                      2
                  )
              );
              [DayofWeek] <> 6 && [DayofWeek] <> 7
          ))
      • v-eachen-msft's avatar
        v-eachen-msft
        Icon for Community Support rankCommunity Support

        Hi RonaldvdH ,

         

        You could use a card visual to show the [binnengekomen] and check if it is correct.