Help count date

Good evening,

I need to create a measure that counts all the business days of the current month (but this measure has to consider Saturday = 0.5 and Sunday = 0), meaning there would be 5.5 days in a week.

You can use below calculated field with below definition to get what required. Although I would suggest to do this in sql with case statement. Which give better flexibility.

ifelse(toString(extract(ā€˜WDā€™,{you_date_column}))=ā€˜1ā€™,0.00,toString(extract(ā€˜WDā€™,{date_val}))=ā€˜7ā€™,0.50,1.00)

here quicksight resolves Sunday to 1 and 7 for Saturday

1 Like