cancel
Showing results for
Did you mean:
Anonymous
Not applicable

## Number formatting based on the condition

Hi All,

I want to format below expression outcome Count(TestcaseId) such that if the Count(TestcaseId)>10000 then the value should be in format of 10k or else a normal number 10000. Eg if number is 12350 then number should be 12.35K else if it is 9999 then it should show 9999 only. Please help.

1 Solution

Accepted Solutions
Partner - Master III

Try,

if(

Count(TestcaseId) >= 10000,

num( Count(TestcaseId)/10000, '#,##0.##', '.' , ',' )&' K',

num(Count(TestcaseId),'#,##0.##', '.' , ',' )

)

19 Replies
Partner - Champion

what you asking for which chart object in Qlik Sense ?

Anonymous
Not applicable
Author

its for Line Graph Chart

Partner - Champion

I guess you can't.

Creator

Hello! Try something like this:

=if((Count(TestcaseId)/10000) >= 1,

num( Count(TestcaseId)/1000, '#,##0.##', '.' , ',' )&' K',

num(Count(TestcaseId),'#,##0.##', '.' , ',' )

)

Anonymous
Not applicable
Author

This link showing K in values less than 10000 and values greater than 10k are not showing.

Partner - Master III

Try,

if(

Count(TestcaseId) >= 10000,

num( Count(TestcaseId)/10000, '#,##0.##', '.' , ',' )&' K',

num(Count(TestcaseId),'#,##0.##', '.' , ',' )

)

Partner - Champion III

Try a dual value, like this

=Dual(

If(Count(TestcaseId) < 10000, Num(Count(TestcaseId)), Num(Count(TestcaseId) / 1000, '0.00K')),

Count(TestcaseId)

)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Creator II

If(COUNT(TestcaseId) < 10000, Num(COUNT(TestcaseId)), Num(COUNT(TestcaseId) / 1000, '0.00K'))

Partner - Contributor III

Hello

use following Expression

if(

Count(TestcaseId) >= 10000,

num( Count(TestcaseId)/10000, '#,##0.##', '.' , ',' )&' K',

num(Count(TestcaseId),'#,##0.##', '.' , ',' )

)

Regards

Vikas