Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

General Discussions

Discuss any topics that are not product-specific here.

RESTAR DIAS FERIADOS Y FINES DE SEMANA

Carocarrillo
7 - Meteor

Hola Comunidad

 

Estoy usando una formula 

"DateTimeDiff" para restar los días que hay de diferencia entre una fecha y otra ejemplo:

DateTimeDiff([Date1],[Date2], "day")

 

El tema es que aun tengo que restar los días feriados de un país y también restar los fines de semana a esa diferencia de días entre la fecha Date1 y Date2. ¿Saben como podría formular eso?

 

 

1 REPLY 1
caltang
17 - Castor
17 - Castor

Hola! Antes de ayudarte con tu pregunta, creo que la sintaxis debería ser:

 

DateTimeDiff([Date1],[Date2], "days")

 

Puede utilizar la herramienta "Generar filas" para obtener la fecha de inicio hasta la fecha final de su análisis. A partir de ahí, añada una fórmula como esta:

 

 

DateTimeFormat([Date],"%A")

 

 

Este %A te da el día de la semana. A continuación, puede encontrar los fines de semana y filtrarlos.

 

Aquí tiene algunos enlaces que le ayudarán:

  1. https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/How-to-exclude-Weekends-amp-So...
  2. https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Count-working-days/td-p/672159
  3. https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Datetimediff-using-only-weekda...
  4. https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Counting-Business-Days-Only/td...
  5. https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Count-workday-difference-betwe... 
Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
Labels
Top Solution Authors