I have the following case:
- A Variable Input component is configured to write to a variable called "Target"
- AN OLAP table with one of the KPIs calculating the difference in days between the actual throughput time and the "Target" input
- The formula I am using is: TRIMMED_MEAN(CALC_THROUGHPUT(CASE_START TO CASE_END, REMAP_TIMESTAMPS(""."", DAYS)), 5, 5) - <%=Target%>)
- However, the table output will fail if the user wipes out the value from the Variable Input component (which for sure can be the case).
I've tried with different operators to handle CASE WHEN the variable is empty (blank): IS NULL, != '', !="" - it's not working (e.g.
CASE WHEN <%=Target%> IS NOT NULL
THEN
(TRIMMED_MEAN(CALC_THROUGHPUT(CASE_START TO CASE_END, REMAP_TIMESTAMPS("GTO_Application_Workflow_csv"."CHANGE DATE", DAYS)), 5, 5)
- <%=Target%>)
ELSE NULL
END)
The only solution I was able to found in documentations deals with the same issue for filters, but not for the formulas: <% if(Target != "") { %> FILTER ""."" IN (<%=Target%>); <% } %>
How can I make PQL digest the fact that my variable is just empty?)
Thanks a lot in advance.