Forum Discussion

D_Brandon_E's avatar
D_Brandon_E
Regular Visitor
4 years ago
Solved

DatesBetween when both dates are connected to Date table but none are primary

Hi everyone,   I am working on a project and the datasource I am receiving to work with is not the best but I do not have any control over it. I have a table in which there are around 10-15 seperat...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi D_Brandon_E ,

     

    DATEBETWEEN function will return a table that contains a column of dates that begins with a specified start date and continues until a specified end date. So you will get this error "A table of multiple values was supplied...."  in your calculated table. I suggest you to try DATEDIFF function.

    Complete Datediff = 
    IF (
        'Table'[Status] = "Completed",
        DATEDIFF ( 'Table'[StartDate], 'Table'[EndDate], DAY ),
        BLANK ()
    )

    Result is as below.

     

    Best Regards,
    Rico Zhou

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.