# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

New Contributor II

## 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.

Tags (3)
1 Solution

Accepted Solutions
Partner

## Re: Number formatting based on the condition

Try,

if(

Count(TestcaseId) >= 10000,

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

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

)

19 Replies
Partner

## Re: Number formatting based on the condition

what you asking for which chart object in Qlik Sense ?

New Contributor II

## Re: Number formatting based on the condition

its for Line Graph Chart

Partner

## Re: Number formatting based on the condition

I guess you can't.

New Contributor III

## Re: Number formatting based on the condition

Hello! Try something like this:

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

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

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

)

New Contributor II

## Re: Number formatting based on the condition

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

Partner

## Re: Number formatting based on the condition

Try,

if(

Count(TestcaseId) >= 10000,

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

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

)

MVP

## Re: Number formatting based on the condition

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
Contributor II

## Re: Number formatting based on the condition

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

Partner

## Re: Number formatting based on the condition

Hello

use following Expression

if(

Count(TestcaseId) >= 10000,

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

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

)

Regards

Vikas