3 Replies Latest reply on Apr 23, 2018 10:10 PM by kumar bharat

Sum falls in set date

Hi all,

would like to seek your expertise on this calculation.

sum of sales should automatically fall in ND dates if queue date and ND is matched, workbook attached for reference.

ND

April 1, 2018 = 5617

April 2, 2018 = 0

April 3, 2018 = 0

April 4, 2018 = 0

April 5, 2018 = 0

April 6, 2018 = 0

April 7, 2018 = 0

April 8, 2018 = 0

April 9, 2018 = 4318

April 10, 2018 = 0

April 11, 2018 = 0

April 12, 2018 = 0

April 13, 2018 = 0

April 14, 2018 = 0

April 15, 2018 = 0

April 16, 2018 = 0

April 17, 2018 = 0

April 18, 2018 = 0

• 1. Re: Sum falls in set date

Hi Michael,

You can use a sum if function in tableau to achieve the same.

hope it helps.

thanks,

bharat

• 2. Re: Sum falls in set date

sorry mate, none of the links helped me, to give a better picture of the problem here is a screenshot of the sumif formula to be achieved. kumar bharat

• 3. Re: Sum falls in set date

Hi Michael,

if table1 and table2 have a common column and you have join condition in place then

here's the syntax:

sum(if datepart('field1',date)=datepart('field2',date) then sales)

in your case it would be

sum(if datepart('table2.queuedate',date)=datepart('table1.ind',date) then sales)

hope it helps.

thanks,

bharat