How to Sum based using an if statement

0 votes
How to sum up values according to IF condition? i want to calculate sum of sales if profit has reached is greater or reached a constant.
Apr 24, 2019 in Tableau by Priya
272 views

1 answer to this question.

0 votes
Hi Priya,

Follow below steps:

1.  Click on Analysis - > Calculated field.

2. For suppose if you want to find sales for profit >100 and then display their sum of sales then,

IF [Profit] >2000 THEN [Sales]

ELSE O

END

3. This would give sales for only those whose profit >2000.

4. So similarly, you can group fields using condition and then perform aggregation using IF condition.

Hope this helps you.
answered Apr 25, 2019 by Cherukuri
• 33,050 points

Related Questions In Tableau

0 votes
1 answer

How to use a IFF statement in Tableau

Use this syntax -  IIF(([Avg_sale] > [Today]),STR([Avg_sal ...READ MORE

answered Apr 5, 2018 in Tableau by QueenBee
• 1,820 points
1,292 views
0 votes
1 answer

How to use LOD to count distinct number of records based on some condition?

From the desired output it seems that ...READ MORE

answered Apr 9, 2018 in Tableau by xyz
• 1,560 points
16,175 views
+1 vote
1 answer

How to authenticate and embed Tableau Rest API using Python 2.7

Your .format() call is creating a bad ...READ MORE

answered Jul 19, 2018 in Tableau by Atul
• 10,230 points
1,962 views
0 votes
1 answer

How to color code cells of a column based on the text value in Tableau

You can use the following steps to ...READ MORE

answered Mar 27, 2018 in Tableau by Atul
• 10,230 points
8,375 views
+1 vote
1 answer
0 votes
1 answer

Calculated filed with if-then

Below is the required code:  IF (NOT ISNULL([test2])) ...READ MORE

answered Mar 27, 2018 in Tableau by Atul
• 10,230 points
905 views
+2 votes
1 answer
0 votes
1 answer

How to perform a calculation using one variable with an aggregation in calculated field?

Hi, You can use the calculative field and ...READ MORE

answered May 20, 2019 in Tableau by anonymous
• 33,050 points
259 views
0 votes
1 answer

In Tableau, How to sum the last 7 days of the value?

It can be achieved easily by creating ...READ MORE

answered Mar 12, 2019 in Tableau by Cherukuri
• 33,050 points
13,726 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP