Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Milaf
Contributor III
Contributor III

Add N/A condition to a calculated field

Hi everyone,

I am writing the following calculation to the KPI object and I multiplex this KPI object for each metric. When the user selects a team from the filter, the team's scores are displayed. Some metrics do not contain values for some teams and I want it to say 'N/A' for those KPIs.

AVG({<IS_SCORE={'1'}, [MetricName]={'Truncate'}>}AGGR(SUM(SCORE),[Team],[MetricId]))

I add if at the beginning of the formula and write N/A at the end of the parentheses for the case of 0, but this time it returns 0.00%.

What is the correct syntax?

Thank you. 

Labels (1)
1 Solution

Accepted Solutions
Antoine04
Partner - Creator III
Partner - Creator III

Hello,

The syntax looks of for me.

Maybe you can try to use the Coalesce() function.

Maybe something like : Coalesce(Sum(Score),'N/A').

Hope it helps.

Regards

Antoine

View solution in original post

2 Replies
Antoine04
Partner - Creator III
Partner - Creator III

Hello,

The syntax looks of for me.

Maybe you can try to use the Coalesce() function.

Maybe something like : Coalesce(Sum(Score),'N/A').

Hope it helps.

Regards

Antoine

Milaf
Contributor III
Contributor III
Author

Thank you for the quick solution, it is much more practical to write this instead of if.