Skip to main content

hello, i need your help with a formula.

The following formula does not yet work 100%.

COUNT (DISTINCT CASE

WHEN /RWEE/PMCP_TAUFK.SLATX LIKE S -% - S% THEN T_CEL_AT_HP5. AUFNR1

WHEN MATCH_ACTIVITIES (T_CEL_AT_HP5. TXT30, NODE [Outlook: finished message sent]) = 1 THEN T_CEL_AT_HP5. AUFNR1

ELSE NULL END)

In my opinion it does not matter in this formula which of the two conditions applies.

I would like to have the formula changed so that both conditions must be met.

What needs to be changed in the formula?

thx

Hi Steven,
in a CASE WHEN, the first condition that is true is taken and the corresponding value in the THEN is returned.
If you have multiple conditions that should be true, you can simply connect them with an AND. In your case, it would look like this:
COUNT (DISTINCT CASE
WHEN "/RWEE/PMCP_TAUFK"."SLATX" LIKE 'S -% - S%'
AND MATCH_ACTIVITIES ("T_CEL_AT_HP5". "TXT30", NODE ['Outlook: finished message sent']) = 1
THEN "T_CEL_AT_HP5"."AUFNR1"
ELSE NULL END)

Cheers
David
MERCI. it works very nice

The opposite of the AND operator would be the OR operator. This allows you to create a statement where one OR the other condition needs to be met for the statement to be true. Just in case you have multiple conditions that all result in the same output. Just for completeness :)

 

Best

Kevin


Reply