Skip to main content

Hi everyone,

 

i have a Dashboard as the attachment. On the Slider "Year",  i have max date as 11/20/2015 and min date as 11/06/2015. i want to calculate the Date sale like this:

Delta sale = Sale on max date (11/20/2015)-Sale on min date (11/06/2015)

 

How to calculate delta Sale on max and min date

 

i have tried with some Calculation but it still doesnt work. Can you guy please help me. Thanks

8 answers
  1. Sep 21, 2015, 1:12 PM

    If you're using Tableau 9 you can use a LoD calc:

     

    SUM(IF [Year]={FIXED [Class], [PR Number]: MAX([Year]) } THEN [Sale] ELSE 0 END)

    -SUM(IF [Year]={FIXED [Class], [PR Number]: MIN([Year]) } THEN [Sale] ELSE 0 END)

     

    You can go from this:

    If you're using Tableau 9 you can use a LoD calc: SUM(IF [Year]={FIXED [Class], [PR Number]: MAX([Year]) } THEN [Sale] ELSE 0 END)-SUM(IF [Year]={FIXED [Class], [PR Number]: MIN([Year]) } THEN [Sale]

     

    To this:

    Screen+Shot+2015-09-21+at+8.10.48+AM.png

0/9000