6 Replies Latest reply on Feb 11, 2016 4:06 AM by Shinichiro Murakami

    Replicate excel formula: week calendar - ron de bruin

    carlos.sanzporro.0

      Hello, I want to replicate a excel formula, and i can´t to replicate:

       

      Excel:

      =ENTERO((A2-FECHA(AÑO(A2-DIASEM(A2-1)+4);1;3)+DIASEM(FECHA(AÑO(A2-DIASEM(A2-1)+4);1;3))+5)/7)

       

      My wrong tableau calculation replication (Ron de bruin):

      ([Fecha]-DATE(DATEPART('year',([Fecha]-DATEPART('weekday',[Fecha]-1)+4)))+

      DATEPART('year',[Fecha]-(DATEPART('weekday',[Fecha]-1)+4))+5)/7

       

      Error.png

       

      Ron de bruin info:

      http://www.rondebruin.nl/win/s8/win001.htm

       

      I attach excel calculation and my fail twbx.

       

      Example calendars

      http://www.calendario-365.es/calendario-2015.html

      http://www.calendario-365.es/calendario-2016.html

      Calendario 2016

       

      thanks