4 Replies Latest reply on Oct 4, 2018 5:41 AM by Archil Garishvili

# sumifs + sumifs

hi I need some help with sumifs function in tabeau

so I have data as following:

 date 1 money 1 date 2 money 2 06/08/2018 40 06/09/2018 20 29/09/2018 50 29/08/2018 55 15/08/2018 60 15/09/2018 15 15/09/2018 70 15/08/2018 25 08/08/2018 80 08/09/2018 35 07/09/2018 90 07/09/2018 45

so I need to sum up money1 and money2, depending on the day, for example if I want report for AUGUST I should select 40, 60 and 80 from MONEY1 and 55 and 25 from MONEY2 since the corresponding dates are august.

and my final number should be 260 (40+60+80+55+25)

• ###### 1. Re: sumifs + sumifs

I would break this into a couple of calcs just for clarity.  I would use a date parameter to define the report period.

CALC1:

if datetrunc('month', [date 1]) = datetrunc('month', [Parameter 1]) then [money 1] end

CALC2:

if datetrunc('month', [date 2],) = datetrunc('month', [Parameter 1]) then [money 2] end

Final value would be

SUM(CALC1) + SUM(CALC2)

1 of 1 people found this helpful
• ###### 2. Re: sumifs + sumifs

Hi ,

You can try below approach:

1. Create a parameter : "Select Date"

2. Total

SUM(IF DATENAME('month',[Select Date])=DATENAME('month',[date1]) then [Money1] else 0 end)

+

SUM (IF DATENAME('month',[Select Date])=DATENAME('month',[date2]) then [Money 2] else 0 end)

1 of 1 people found this helpful
• ###### 3. Re: sumifs + sumifs

Another Approach;

Pivot Your data and then use the Calculation:

Thanks

Deepak

If it Helps, Pl Mark it Helpful and CORRECT to Close Thread

1 of 1 people found this helpful
• ###### 4. Re: sumifs + sumifs

Hi guys thanks a lot for the help, all your replies really helped me, once again thanks a lot