Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
danialier
Creator III
Creator III

One decimal

Hello,

What else do I need to add to this formula so it only shows ONE decimal ?

  =((num(sum({<Period={'Feb'},BA={'Net Revenues'}>}Amount)/1000))/
    (
num(sum({<Period={'Jan'},BA={'Net Revenues'}>}Amount)/1000))-1)*100

thks,dani

1 Solution

Accepted Solutions
its_anandrjs

Hi,

Try like this

=num( ((num(sum({<Period={'Feb'},BA={'Net Revenues'}>}Amount)/1000))/
    (
num(sum({<Period={'Jan'},BA={'Net Revenues'}>}Amount)/1000))-1)*100,'
#,##0.0')

Hope this helps

Thanks & Regards

View solution in original post

7 Replies
maxgro
MVP
MVP

=num(1/3, '#.##0,0')

EDIT: or go here (tablebox, chart) to choose format

2014-03-20 09_56_12-Il Kindle di massimo per PC - Programming in HTML5 with JavaScript and CSS3_ Tra.png

Anonymous
Not applicable

just use the "round" funtion...for ex; round(3.88, 0, 1) = 3,9

its_anandrjs

Hi,

Try like this

=num( ((num(sum({<Period={'Feb'},BA={'Net Revenues'}>}Amount)/1000))/
    (
num(sum({<Period={'Jan'},BA={'Net Revenues'}>}Amount)/1000))-1)*100,'
#,##0.0')

Hope this helps

Thanks & Regards

preminqlik
Specialist II
Specialist II

num(expression,'#.#')

or else go to number format tab and you can do over there

MK_QSL
MVP
MVP

NUM(yourexpression, '#,##0.0')

Not applicable

In addition:

Note that it is related to the setting of your decimal separator:

This is a setting that normally is set on the Main tab of your loadscript:   

SET DecimalSep=',';

So when this value is a comma (like above) then this is correct

=num(1/3, '#.##0,0')

When it is a dot (like below)

SET DecimalSep='.';


=num(1/3, '#.##0.0')


is correct

its_anandrjs

Hi,

Check your decimal separator is and according to separator change comma or decimal in this script '#,##0.0'

=num( ((num(sum({<Period={'Feb'},BA={'Net Revenues'}>}Amount)/1000))/
    (
num(sum({<Period={'Jan'},BA={'Net Revenues'}>}Amount)/1000))-1)*100,'
#,##0.0')

Otherwise change is Properties -> Number -> change fixed to upto 1 decimal place.

Hope this helps

Thanks & Regards