Skip to main content

CASE WHEN "AE_SIGNALS"."AE_SKILL_NAME" LIKE ('%Veredelung%') THEN COUNT ( "AE_SIGNALS"."SIGNAL_ID" ) * 30 / 60 ELSE NULL END

I get the following error:

The aggregation function COUNT cannot be used together with a dimension function input. Please check that there are no aggregations and dimensions used together as function inputs.

Try PU_COUNT() instead


@Guillermo Gost Unfortunately it does not work with that either.


you can try something like :

COUNT(

CASE WHEN "AE_SIGNALS"."AE_SKILL_NAME" LIKE ('%Veredelung%') 

THEN "AE_SIGNALS"."SIGNAL_ID" ELSE NULL END ) * 30 / 60


you can try something like :

COUNT(

CASE WHEN "AE_SIGNALS"."AE_SKILL_NAME" LIKE ('%Veredelung%') 

THEN "AE_SIGNALS"."SIGNAL_ID" ELSE NULL END ) * 30 / 60

Can also be written as:

 

SUM(

CASE

WHEN "AE_SIGNALS"."AE_SKILL_NAME" LIKE ('%Veredelung%')

THEN 1.0

ELSE 0.0

END)

*30 / 60


@rio.cinco12 this one works, thank you for that.

Do you have an idea to set this up for more then one option?

I'd like to count two different cases with different amounts.

 

F.e.

COUNT(

CASE

WHEN "AE_SIGNALS"."AE_SKILL_NAME" LIKE ('%Veredlung%')

THEN ("AE_SIGNALS"."SIGNAL_ID") * 30 / 60

WHEN "AE_SIGNALS"."AE_SKILL_NAME" LIKE ('%Warnweste%')

THEN ("AE_SIGNALS"."SIGNAL_ID") * 45 / 60

ELSE NULL END)

 

Error:

Operator requirements are not met. Operator 'MULT' is not compatible with inputs of type STRING and INT.

Thanks in advance!

 

 


Hi, are you looking for count of this two skills with some operations. I think you can add both results, it should yield the same result.

 

COUNT(

CASE WHEN "AE_SIGNALS"."AE_SKILL_NAME" LIKE ('%Veredelung%') 

THEN "AE_SIGNALS"."SIGNAL_ID" ELSE NULL END ) * 30 / 60

+

COUNT(

CASE WHEN "AE_SIGNALS"."AE_SKILL_NAME" LIKE ('%Warnweste%') 

THEN "AE_SIGNALS"."SIGNAL_ID" ELSE NULL END ) * 45 / 60


Hi @rio.cinco12 I'd like to have an either operation.

So If it's ('%Veredelung%') i need the amount of *30/60 and if it's ('%Warnweste%') i need the amount of * 45/60.


Hi @rio.cinco12 I'd like to have an either operation.

So If it's ('%Veredelung%') i need the amount of *30/60 and if it's ('%Warnweste%') i need the amount of * 45/60.

Hi, is the above code works for you ?


Hi, is the above code works for you ?

Hi @rio.cinco12  - yes perfect, thanks!

 


Reply