cancel
Showing results for 
Search instead for 
Did you mean: 

Key Figures Calculations

Former Member
0 Kudos

Dear community,

Would anybody have the pleasure to answer my following question?

When I want to say "if "attribute" =TEXT VALUE, then give 0 otherwise 1"

How can I create the syntax of that?

I know that for declaring the attribute,  I can put "quotation marks" but what about the text value? Do I also put quotation marks?

Thank you very much for your time

Kind regards

Vasilis

Accepted Solutions (1)

Accepted Solutions (1)

parveen_kumar6
Advisor
Advisor
0 Kudos

Hello Vasilis

If you use a constant in an expression, you must use two single quotation marks before and after the attribute value (for example, “constant”) or ''TEXT VALUE''.

Thanks

Parveen Kumar

Former Member
0 Kudos

Hi Parveen and thank you for your quick response!

In other words you mean that it should be like:

if ("PRODDESC"=""RANDOM"",0,1) ?

Kind regards

Vasilis

parveen_kumar6
Advisor
Advisor
0 Kudos

Hello Vasilis

You just need to enclose in the pair of single quotes.Kindly make sure that you use pair of single qoute rather than one double qoute.

if("PRODDESC") =''RANDOM'',0,1)

Thanks

Parveen Kumar

Former Member
0 Kudos

Hi Parveen,

Thank you for your response again!

Let's assume that :

  • PRODDESC is attribute
  • RANDOM is attribute value

Do I put both in attribute and attribute value a pair of single quotes back and forth?

Additionally, should I also put a second brucket in front of the attribute? e.g if (("PRODDESC")="RANDOM",0,1)


Regards

Vasilis

parveen_kumar6
Advisor
Advisor
0 Kudos

Hello Vasilis

The second bracket is not required. I had put it by mistake.

Thanks

Parveen Kumar

Answers (0)