5 Replies Latest reply on Mar 12, 2013 6:20 AM by Brad Llewellyn

    Using WINDOW_SUM function




      Excuse me for my english.


      We have problems with mesures from 2nd level DATA.

      Conssidering this datamodel :

      Table1 : id_dataTable1 : nameTable1 : salaryTable2 : data1Table2 : data2




      If i make mesure name "number of employes" with this formula : COUNTD(id_data), i have no problems


      But if i make a mesure name "salary cost" with this formula SUM(salary), results are wrong.

      Tableau calculate 4250 for paul and 1895 for leon.


      We can explain this because of the jointure of table1 with table2, the occurence for paul is multiply.


      We have find a solution by using a formula like WINDOW_SUM(ATTR([salary])). this mesure is using with id_data dimenssion.

      But this solution have two problems :

      - when you use a mesure with WINDOW_SUM function, the necessary dimenssion for the calcul is not automatiquely provided by tableau on the sheet.

      This solution is very diffuclt to use for basic user.

      - Performance of table calcul is a bit low.


      In conclusion, we search a user-firendly solution for this problems.


      Have you another way to provide calcul on data salary with no double ?

      How can we automatiquely provide dimenssion necessary for mesure using WINDOW_SUM function ?


      Thank you for your help