IF Statement in tableauTable Calc - with IF statement? - TableauTableau IF THEN statementTableau If StatementUse subquery in select statement in TableauTableau Python Script only processing one row of data…it should be 1000'sIIF or IF statement in TableauTableau elseif statementConvert Aggregated field into Non-Aggregated field in TableauTableau: COUNTD using IF statementTableau Calculation IF statement
Is this password scheme legit?
Many many thanks
Biological refrigeration?
Find feasible point in polynomial time in linear programming
Is there a word or phrase that means "use other people's wifi or Internet service without consent"?
Is the Amazon rainforest the "world's lungs"?
How to force GCC to assume that a floating-point expression is non-negative?
What to do about my 1-month-old boy peeing through diapers?
How many petaflops does it take to land on the moon? What does Artemis need with an Aitken?
Force SQL Server to use fragmented indexes?
Was a star-crossed lover
Can I get a PhD for developing an educational software?
Count the number of triangles
Talk interpreter
Federal Pacific 200a main panel problem with oversized 100a 2pole breaker
Is a memoized pure function itself considered pure?
Should I use the words "pyromancy" and "necromancy" even if they don't mean what people think they do?
Pen test results for web application include a file from a forbidden directory that is not even used or referenced
Defending Castle from Zombies
Are (c#) dictionaries an Anti Pattern?
Why does this London Underground poster from 1924 have a Star of David atop a Christmas tree?
Do sharpies or markers damage soft rock climbing gear?
Dotted background on a flowchart
To what extent should we fear giving offense?
IF Statement in tableau
Table Calc - with IF statement? - TableauTableau IF THEN statementTableau If StatementUse subquery in select statement in TableauTableau Python Script only processing one row of data…it should be 1000'sIIF or IF statement in TableauTableau elseif statementConvert Aggregated field into Non-Aggregated field in TableauTableau: COUNTD using IF statementTableau Calculation IF statement
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I have written the folowing condition as per the some online tutorial
IF [Nationality]="England"
THEN "England"
ELSEIF [Nationality]="Germany"
THEN "Germany"
ELSE "Others"
END
But continuously getting an error:
"The formula must be a boolean formula"
What is wrong in the condition?
I have tried other statements too CASE
and CONTAINS
for them too same error.
It should accept.
tableau
add a comment |
I have written the folowing condition as per the some online tutorial
IF [Nationality]="England"
THEN "England"
ELSEIF [Nationality]="Germany"
THEN "Germany"
ELSE "Others"
END
But continuously getting an error:
"The formula must be a boolean formula"
What is wrong in the condition?
I have tried other statements too CASE
and CONTAINS
for them too same error.
It should accept.
tableau
add a comment |
I have written the folowing condition as per the some online tutorial
IF [Nationality]="England"
THEN "England"
ELSEIF [Nationality]="Germany"
THEN "Germany"
ELSE "Others"
END
But continuously getting an error:
"The formula must be a boolean formula"
What is wrong in the condition?
I have tried other statements too CASE
and CONTAINS
for them too same error.
It should accept.
tableau
I have written the folowing condition as per the some online tutorial
IF [Nationality]="England"
THEN "England"
ELSEIF [Nationality]="Germany"
THEN "Germany"
ELSE "Others"
END
But continuously getting an error:
"The formula must be a boolean formula"
What is wrong in the condition?
I have tried other statements too CASE
and CONTAINS
for them too same error.
It should accept.
tableau
tableau
edited Mar 28 at 3:11
Daniel Sims
1,4201 gold badge3 silver badges17 bronze badges
1,4201 gold badge3 silver badges17 bronze badges
asked Mar 27 at 20:11
Dipak ChatterjeeDipak Chatterjee
481 gold badge1 silver badge11 bronze badges
481 gold badge1 silver badge11 bronze badges
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
It looks like you might be trying to filter by condition as pictured below. This field does, indeed, require a boolean condition. It needs to know whether to filter out (False) or keep in (True).
Instead of using this dialog box, try the following:
Right Click [Nationality] Field > Click "Create..." > Calculated Field
If you put your calculation in the dialog box that pops up, it will work. From there you can filter accordingly.
1
Got it. Thanks for the help.
– Dipak Chatterjee
Mar 28 at 20:09
IF this solved your question entirely THEN please assign the green check mark. :) This will help others in the future who have the same question.
– Daniel Sims
Mar 29 at 18:57
Where can I do that green check mark ?
– Dipak Chatterjee
Mar 30 at 19:33
It’s right next to the up and down arrows on my answer. (It’s actually grey til clicked)
– Daniel Sims
Mar 30 at 19:45
I think I have done it correctly. Right?
– Dipak Chatterjee
Mar 30 at 19:59
|
show 3 more comments
Seems like you are trying an IF condition in one of your filters.
In order for a filter condition to be valid, it should always evaluate to True or False. In your example, you may need to modify your code as below:
(IF [Nationality]="England"
THEN "England"
ELSEIF [Nationality]="Germany"
THEN "Germany"
ELSE "Others"
END) = <Some Column>
In the above code you are evaluating your IF condition against some column value.
Hope this helps!
It's showing wrong result
– Dipak Chatterjee
Mar 28 at 19:52
prntscr.com/n4bf8b
– Dipak Chatterjee
Mar 28 at 19:53
Expected Output is % of England Germany and Others
– Dipak Chatterjee
Mar 28 at 19:53
Sorry buddy, I am not clear on the requirement. Can you help answer following question. Are you trying to add a filter or a calculadora field? The calculation you are testing to put is for getting the % or the nationality?
– Pulkit Bansal
Mar 30 at 1:19
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55385668%2fif-statement-in-tableau%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
It looks like you might be trying to filter by condition as pictured below. This field does, indeed, require a boolean condition. It needs to know whether to filter out (False) or keep in (True).
Instead of using this dialog box, try the following:
Right Click [Nationality] Field > Click "Create..." > Calculated Field
If you put your calculation in the dialog box that pops up, it will work. From there you can filter accordingly.
1
Got it. Thanks for the help.
– Dipak Chatterjee
Mar 28 at 20:09
IF this solved your question entirely THEN please assign the green check mark. :) This will help others in the future who have the same question.
– Daniel Sims
Mar 29 at 18:57
Where can I do that green check mark ?
– Dipak Chatterjee
Mar 30 at 19:33
It’s right next to the up and down arrows on my answer. (It’s actually grey til clicked)
– Daniel Sims
Mar 30 at 19:45
I think I have done it correctly. Right?
– Dipak Chatterjee
Mar 30 at 19:59
|
show 3 more comments
It looks like you might be trying to filter by condition as pictured below. This field does, indeed, require a boolean condition. It needs to know whether to filter out (False) or keep in (True).
Instead of using this dialog box, try the following:
Right Click [Nationality] Field > Click "Create..." > Calculated Field
If you put your calculation in the dialog box that pops up, it will work. From there you can filter accordingly.
1
Got it. Thanks for the help.
– Dipak Chatterjee
Mar 28 at 20:09
IF this solved your question entirely THEN please assign the green check mark. :) This will help others in the future who have the same question.
– Daniel Sims
Mar 29 at 18:57
Where can I do that green check mark ?
– Dipak Chatterjee
Mar 30 at 19:33
It’s right next to the up and down arrows on my answer. (It’s actually grey til clicked)
– Daniel Sims
Mar 30 at 19:45
I think I have done it correctly. Right?
– Dipak Chatterjee
Mar 30 at 19:59
|
show 3 more comments
It looks like you might be trying to filter by condition as pictured below. This field does, indeed, require a boolean condition. It needs to know whether to filter out (False) or keep in (True).
Instead of using this dialog box, try the following:
Right Click [Nationality] Field > Click "Create..." > Calculated Field
If you put your calculation in the dialog box that pops up, it will work. From there you can filter accordingly.
It looks like you might be trying to filter by condition as pictured below. This field does, indeed, require a boolean condition. It needs to know whether to filter out (False) or keep in (True).
Instead of using this dialog box, try the following:
Right Click [Nationality] Field > Click "Create..." > Calculated Field
If you put your calculation in the dialog box that pops up, it will work. From there you can filter accordingly.
answered Mar 27 at 23:49
Daniel SimsDaniel Sims
1,4201 gold badge3 silver badges17 bronze badges
1,4201 gold badge3 silver badges17 bronze badges
1
Got it. Thanks for the help.
– Dipak Chatterjee
Mar 28 at 20:09
IF this solved your question entirely THEN please assign the green check mark. :) This will help others in the future who have the same question.
– Daniel Sims
Mar 29 at 18:57
Where can I do that green check mark ?
– Dipak Chatterjee
Mar 30 at 19:33
It’s right next to the up and down arrows on my answer. (It’s actually grey til clicked)
– Daniel Sims
Mar 30 at 19:45
I think I have done it correctly. Right?
– Dipak Chatterjee
Mar 30 at 19:59
|
show 3 more comments
1
Got it. Thanks for the help.
– Dipak Chatterjee
Mar 28 at 20:09
IF this solved your question entirely THEN please assign the green check mark. :) This will help others in the future who have the same question.
– Daniel Sims
Mar 29 at 18:57
Where can I do that green check mark ?
– Dipak Chatterjee
Mar 30 at 19:33
It’s right next to the up and down arrows on my answer. (It’s actually grey til clicked)
– Daniel Sims
Mar 30 at 19:45
I think I have done it correctly. Right?
– Dipak Chatterjee
Mar 30 at 19:59
1
1
Got it. Thanks for the help.
– Dipak Chatterjee
Mar 28 at 20:09
Got it. Thanks for the help.
– Dipak Chatterjee
Mar 28 at 20:09
IF this solved your question entirely THEN please assign the green check mark. :) This will help others in the future who have the same question.
– Daniel Sims
Mar 29 at 18:57
IF this solved your question entirely THEN please assign the green check mark. :) This will help others in the future who have the same question.
– Daniel Sims
Mar 29 at 18:57
Where can I do that green check mark ?
– Dipak Chatterjee
Mar 30 at 19:33
Where can I do that green check mark ?
– Dipak Chatterjee
Mar 30 at 19:33
It’s right next to the up and down arrows on my answer. (It’s actually grey til clicked)
– Daniel Sims
Mar 30 at 19:45
It’s right next to the up and down arrows on my answer. (It’s actually grey til clicked)
– Daniel Sims
Mar 30 at 19:45
I think I have done it correctly. Right?
– Dipak Chatterjee
Mar 30 at 19:59
I think I have done it correctly. Right?
– Dipak Chatterjee
Mar 30 at 19:59
|
show 3 more comments
Seems like you are trying an IF condition in one of your filters.
In order for a filter condition to be valid, it should always evaluate to True or False. In your example, you may need to modify your code as below:
(IF [Nationality]="England"
THEN "England"
ELSEIF [Nationality]="Germany"
THEN "Germany"
ELSE "Others"
END) = <Some Column>
In the above code you are evaluating your IF condition against some column value.
Hope this helps!
It's showing wrong result
– Dipak Chatterjee
Mar 28 at 19:52
prntscr.com/n4bf8b
– Dipak Chatterjee
Mar 28 at 19:53
Expected Output is % of England Germany and Others
– Dipak Chatterjee
Mar 28 at 19:53
Sorry buddy, I am not clear on the requirement. Can you help answer following question. Are you trying to add a filter or a calculadora field? The calculation you are testing to put is for getting the % or the nationality?
– Pulkit Bansal
Mar 30 at 1:19
add a comment |
Seems like you are trying an IF condition in one of your filters.
In order for a filter condition to be valid, it should always evaluate to True or False. In your example, you may need to modify your code as below:
(IF [Nationality]="England"
THEN "England"
ELSEIF [Nationality]="Germany"
THEN "Germany"
ELSE "Others"
END) = <Some Column>
In the above code you are evaluating your IF condition against some column value.
Hope this helps!
It's showing wrong result
– Dipak Chatterjee
Mar 28 at 19:52
prntscr.com/n4bf8b
– Dipak Chatterjee
Mar 28 at 19:53
Expected Output is % of England Germany and Others
– Dipak Chatterjee
Mar 28 at 19:53
Sorry buddy, I am not clear on the requirement. Can you help answer following question. Are you trying to add a filter or a calculadora field? The calculation you are testing to put is for getting the % or the nationality?
– Pulkit Bansal
Mar 30 at 1:19
add a comment |
Seems like you are trying an IF condition in one of your filters.
In order for a filter condition to be valid, it should always evaluate to True or False. In your example, you may need to modify your code as below:
(IF [Nationality]="England"
THEN "England"
ELSEIF [Nationality]="Germany"
THEN "Germany"
ELSE "Others"
END) = <Some Column>
In the above code you are evaluating your IF condition against some column value.
Hope this helps!
Seems like you are trying an IF condition in one of your filters.
In order for a filter condition to be valid, it should always evaluate to True or False. In your example, you may need to modify your code as below:
(IF [Nationality]="England"
THEN "England"
ELSEIF [Nationality]="Germany"
THEN "Germany"
ELSE "Others"
END) = <Some Column>
In the above code you are evaluating your IF condition against some column value.
Hope this helps!
answered Mar 28 at 6:23
Pulkit BansalPulkit Bansal
215 bronze badges
215 bronze badges
It's showing wrong result
– Dipak Chatterjee
Mar 28 at 19:52
prntscr.com/n4bf8b
– Dipak Chatterjee
Mar 28 at 19:53
Expected Output is % of England Germany and Others
– Dipak Chatterjee
Mar 28 at 19:53
Sorry buddy, I am not clear on the requirement. Can you help answer following question. Are you trying to add a filter or a calculadora field? The calculation you are testing to put is for getting the % or the nationality?
– Pulkit Bansal
Mar 30 at 1:19
add a comment |
It's showing wrong result
– Dipak Chatterjee
Mar 28 at 19:52
prntscr.com/n4bf8b
– Dipak Chatterjee
Mar 28 at 19:53
Expected Output is % of England Germany and Others
– Dipak Chatterjee
Mar 28 at 19:53
Sorry buddy, I am not clear on the requirement. Can you help answer following question. Are you trying to add a filter or a calculadora field? The calculation you are testing to put is for getting the % or the nationality?
– Pulkit Bansal
Mar 30 at 1:19
It's showing wrong result
– Dipak Chatterjee
Mar 28 at 19:52
It's showing wrong result
– Dipak Chatterjee
Mar 28 at 19:52
prntscr.com/n4bf8b
– Dipak Chatterjee
Mar 28 at 19:53
prntscr.com/n4bf8b
– Dipak Chatterjee
Mar 28 at 19:53
Expected Output is % of England Germany and Others
– Dipak Chatterjee
Mar 28 at 19:53
Expected Output is % of England Germany and Others
– Dipak Chatterjee
Mar 28 at 19:53
Sorry buddy, I am not clear on the requirement. Can you help answer following question. Are you trying to add a filter or a calculadora field? The calculation you are testing to put is for getting the % or the nationality?
– Pulkit Bansal
Mar 30 at 1:19
Sorry buddy, I am not clear on the requirement. Can you help answer following question. Are you trying to add a filter or a calculadora field? The calculation you are testing to put is for getting the % or the nationality?
– Pulkit Bansal
Mar 30 at 1:19
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55385668%2fif-statement-in-tableau%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown