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 in Tableau by Priya
11 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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 by CHERUKURI
• 13,940 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_sale ...READ MORE

answered Apr 5, 2018 in Tableau by QueenBee
• 1,810 points
74 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,550 points
1,962 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 18, 2018 in Tableau by Atul
• 10,200 points
275 views
+1 vote
1 answer

How to add filter on different sheets based on clicks?

Go to Actions… (if you're on a dashboard, you ...READ MORE

answered Aug 1, 2018 in Tableau by Atul
• 10,200 points
25 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,200 points
945 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,200 points
36 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 5 days ago in Tableau by anonymous
• 13,940 points
11 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 in Tableau by CHERUKURI
• 13,940 points
67 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.