Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Number formatting

I have expression like below,

If(GetFieldSelections(Measure)='SQF',

num((Sum({$<[Type] = {'Used'} >}[SF])),'#,##Sf'),

num((Sum({$<[Type] = {'Used'} >}[SF]*(0.9203))),'#,##Sqm'))

Now,when I set the number to expression default I am getting value something like 1.15E+0.007 and if I set the number to fixed to 0 decimals I dont get Sf or Sqm in front of the number.

Any suggestion/help is much appreciated.

4 Replies
Rajamohan
Contributor III
Contributor III

Try to use & to concatenate symbol with numbers.

- Mohan

engishfaque
Specialist III
Specialist III

Dear Pavana,

Kindly find attached file, I hope you are looking for that one solution.

Kind regards,

Ishfaque Ahmed

PrashantSangle

Hi,

Try

If(GetFieldSelections(Measure)='SQF',

num((Sum({$<[Type] = {'Used'} >}[SF])),'#,00 Sf'),

num((Sum({$<[Type] = {'Used'} >}[SF]*(0.9203))),'#,00 Sqm'))

or

Try

If(GetFieldSelections(Measure)='SQF',

num(Floor(Sum({$<[Type] = {'Used'} >}[SF])),'#,00 Sf'),

num(Floor(Sum({$<[Type] = {'Used'} >}[SF]*(0.9203))),'#,00 Sqm'))

You can use Floor, Round, Ceil function as per requirement

If you want Sf or Sqm in front of the number.

then

If(GetFieldSelections(Measure)='SQF',

num((Sum({$<[Type] = {'Used'} >}[SF])),'Sf #,00'),

num((Sum({$<[Type] = {'Used'} >}[SF]*(0.9203))),'Sqm #,00'))

Note : GetFieldSelections() work when you select field value in Measure.

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
HirisH_V7
Master
Master

Hi,

You can use expression like this,

=Num(Sum(Value), '#,##0.00 Sqm')

&

=Num(Sum(Value), '#,##0.00 Sf')

Is your Value format is in exponential??

Then in edit script,

Num(YourValue, '(dec)') as Value 


HTH,

Hirish



HirisH
“Aspire to Inspire before we Expire!”