-
1. Re: IF condition
Lester Anciro Jul 21, 2016 2:01 AM (in response to Govind Ramchetty)You should use CASE
sample is this one for Superstore.
case [Category] when "Furniture"
then
"Display"
when "Technology"
then
"Display"
ELSE
"Do not display"
END
-
2. Re: IF condition
Ashish Chaudhari Jul 21, 2016 3:41 AM (in response to Govind Ramchetty)Hi Govind,
can you please explain me in when 2=2 case will be executed as per your code?
My view on this is that, it will never get executed.
-Ashish Chaudhari
-
3. Re: IF condition
Govind Ramchetty Jul 21, 2016 4:49 AM (in response to Ashish Chaudhari)If 1st condition also satisfied again I have to go 2nd condition.
My both condition should be come. Just I tried 1=1 and 2=2...
IF 1=1 THEN [Expense Type] ELSEIF 2=2 THEN [UN] END
My idea is I should union both values in single dimension.
-
4. Re: IF condition
khalid norat Jul 21, 2016 4:57 AM (in response to Govind Ramchetty)If 1=1 then [expense Type] end
+
if 2=2 then [UN] end
-
5. Re: IF condition
Ashish Chaudhari Jul 21, 2016 5:09 AM (in response to khalid norat)Hi,
I guess Expense Type can be of type string (just guessing). Not sure about the [UN] column. I doubt if "Plus" sign can work in the scenario.
-Ashish
-
6. Re: IF condition
Ashish Chaudhari Jul 21, 2016 5:11 AM (in response to Govind Ramchetty)Ok. As per condition 1=1 will always be evaluated as true. Thus 2=2 will never be executed. That's what I wanted to convey about the field.
-Ashish
-
7. Re: IF condition
Govind Ramchetty Jul 21, 2016 5:15 AM (in response to khalid norat)This will concatenate result.
E.g
TYpe: aaaa
UN: BBB
Result-->aaaaBBB
MY requirement is
aaaa
BB
-
8. Re: IF condition
Govind Ramchetty Jul 21, 2016 5:16 AM (in response to Ashish Chaudhari)Both Field are Text values only.
-
9. Re: IF condition
khalid norat Jul 21, 2016 6:26 AM (in response to Govind Ramchetty)Are you saying you want one formula to give you 2 values or you want the formula to give you back a combined value with a new line in between
-
10. Re: IF condition
Govind Ramchetty Jul 21, 2016 8:55 AM (in response to khalid norat)yes. I want to show both values in single query.
-
11. Re: IF condition
khalid norat Jul 22, 2016 2:04 AM (in response to Govind Ramchetty)A single calculation can not provide you with two outputs.
you can put to fields as one output concatenated or split by line
-
12. Re: IF condition
Sreenadha Reddy Palakolanu Jul 22, 2016 5:33 AM (in response to Govind Ramchetty)1 of 1 people found this helpfulHi Govind,
If condition can't give more than one value and in this 'IF 1=1 THEN [Expense Type] ELSEIF 2=2 THEN [UN] END'
never execute the elseif condition because 1=1 is true for each and every time.
Otherwise
can you explain your scenario,May be will help you.
Regards,
Sreenadha Reddy P