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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Exclude dimension records based on calculation

Hi everyone,

I would appreciate some assistance with the following problem.

Objective

I am trying to exclude certain dimension records based on the results of an IF statement. The way that I am doing this is to set the EmpName where a Count is > 5 ELSE set the EmpName to NULL. I then exclude Null values from the straight table chart.

Problem

I receive the message "// Error in calculated dimension" when I create a Calculated Dimension using the following statement:

=if(count({total <CurrentYear=CurrentYear, EmpName=EmpName>} TotSals) > 5, EmpName)

However, if I use the same statement to set the Text Format to Bold in the Calculated Dimension then the statement works and the Text is set to Bold.

=if(count({total <CurrentYear=CurrentYear, EmpName=EmpName>} TotSals) > 5, '<B>')

I don't understand how the statement is evaluating correctly for setting the Text Format but not for the overall Dimension level? I have also tried a few variations such as forcing null() into the "else" part of the IF statement but I have not yet been able to get this to work.

Thanks in advance.

Regards,

Craig

10 Replies
Not applicable
Author

Thanks Blessy - this too filters records if an Employee is selected in addition to the Current Year.