2 Replies Latest reply on Aug 22, 2018 4:58 AM by Khoma Usire

    Amount of weeks with a value

    Khoma Usire

      Good people of Tableau, please help me get the code right:

       

      I want to calculate what the average value per week is, but only taking into account those weeks, where value is > 0.

       

      But I can't even get the amount of weeks right - COUNTD(DATEPART( 'week', [Date])) only gets me the amount of weeks between the first and the last active ones.

       

       

      Any suggestions how to get to the number? I've seen Count and If functions combined around here, but no idea how to express to Tableau that I want it applied on weeks.

       

       

      All best,


      Khoma