Hello everyone,
we have an analysis sheet that we export as a pdf via action flow. In this sheet we normally filter on a specific plant number before exporting. We want to add the plant description in the analysis as a text field, but only if just cases of one plant are selected. When there are multiple plants selected, the text field should show "Multiple plants selected".
I have tried to create a formula and add the result in the text field:
CASE
WHEN COUNT(DISTINCT "AUFK"."WERKS") > 1 THEN 'Multiple plants selected''
ELSE "AUFK"."WERKS_TEXT"
END
This throws an error as I am mixing aggregate and case based info. I have also tried to add a PU_FIRST to the ELSE statement, but this does not help.
Is there a way, how this can be done? Thank you for your help.