How to exclude weekend Sunday only to DATEDIFF in Tableau

0 votes

My current formula is : DATEDIFF('day', MIN([Date]),MAX([Date])).

How do I exclude sundays and holidays from this?

Apr 7, 2022 in Tableau by Vaani
• 7,070 points
1,134 views

1 answer to this question.

0 votes

To exclude Sundays from the DATEDIFF calculation in Tableau, you can modify the formula by using the WEEKDAY function:

DATEDIFF('day', MIN([Date]), MAX([Date])) - SUM(INT(WEEKDAY([Date])) = 1)

This formula subtracts the count of Sundays (where the WEEKDAY function returns 1 for Sunday) from the total DATEDIFF result, effectively excluding Sundays from the calculation.

Elevate your data visualization skills with our Tableau Course and unleash the power of insightful analytics.

answered Jul 3, 2023 by anonymous
• 1,380 points

Related Questions In Tableau

0 votes
1 answer

How to color code cells of a column based on the text value in Tableau

You can use the following steps to ...READ MORE

answered Mar 27, 2018 in Tableau by Atul
• 10,240 points
9,910 views
0 votes
1 answer

How to group bins in a tableau histogram?

One of the simple way is by ...READ MORE

answered Apr 3, 2018 in Tableau by xyz
• 1,560 points
6,874 views
0 votes
1 answer

How to use a IFF statement in Tableau

Use this syntax -  IIF(([Avg_sale] > [Today]),STR([Avg_sal ...READ MORE

answered Apr 5, 2018 in Tableau by QueenBee
• 1,820 points
1,930 views
0 votes
1 answer

How to get Tableau results in python?

Well even I was looking for the ...READ MORE

answered Apr 9, 2018 in Tableau by ffdfd
• 5,550 points
910 views
0 votes
1 answer

How to dynamically determine and categorize duplicate value in Tableau?

Apparently you define a duplicate records as ...READ MORE

answered Apr 13, 2018 in Tableau by xyz
• 1,560 points
7,254 views
0 votes
0 answers

Tableau report sharing

We have a number of historical tableau ...READ MORE

Mar 22, 2022 in Tableau by Vaani
• 7,070 points
410 views
0 votes
1 answer

Tableau Public Background Images Not Working

The functionality you're talking about (Map -> ...READ MORE

answered Mar 3, 2022 in Tableau by Vaani
• 7,070 points
454 views
0 votes
1 answer

Error while connecting tableau to snowflake using username and password

"Couldn't resolve host name," says the error ...READ MORE

answered Mar 3, 2022 in Tableau by Vaani
• 7,070 points
825 views
0 votes
1 answer

Dynamically set the value of a filter based on a parameter selection in use to swap sheets

Here's a simplified example of the calculated ...READ MORE

answered Apr 29 in Tableau by anonymous
• 1,380 points
2,136 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP