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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression gives Negative value for percentage(%)???

Hi All,


Here is the expression, It pass through the error check but it gives Negative value as -30%. Please can any one suggest whats wrong with it. There is nothing wrong with the data. It should show me 30% but not -30 %. Thanks

= num((Count(class)-Count({<[student group]={'?'}>}class)*100)/Count(class),'00.00')&'%'

3 Replies
alexandros17
Partner - Champion III
Partner - Champion III

You are computing Count({<[student group]={'?'}>}class)*100

I think that the Whole difference

Count(class)-Count({<[student group]={'?'}>}class)

should be multiplyed by 100

Let me know

Not applicable
Author

Hi Alessandro

Do you mean I can simply change it to:

=Count(class)-Count({<[student group]={'?'}>}class)*100

Please reply.

Thanks

alexandros17
Partner - Champion III
Partner - Champion III

No I mean that you are

counting: Count(class)

Minus

Count({<[student group]={'?'}>}class)*100

and this difference can be negative.

Are you multiplying by 100 to compute the percentage?

If the answer is yes then I should write

(Count(class)-Count({<[student group]={'?'}>}class))*100