15 Replies Latest reply: Apr 27, 2012 1:01 AM by Ashutosh Paliwal

# number formating using set analysis

hi

i am creating a pivot table in which i am having 5 rows and 4 columns.

in the pivot table i have to bring %sign in some rows. how can i achieve that???

my situation is like dis

• ###### number formating using set analysis

Hi Vitulgaur,

For Percentage sign in the row go  to the Properties of the chart => Number Tab = select the Expression => then under the Number Format setting click on the integer and then click on the show in Percentage. then Apply.

Regards,

Nilesh Gangurde

• ###### number formating using set analysis

hi Nilesh

if i follow your instructions then it will do the changes in the whole column..i just have to do it in some rows..

regards

Vitul

• ###### number formating using set analysis

Hi,

Vitul it will not be possible to use the % sign for random cell's you need to define the rules for that, for example if number goes beyond some value or if it decreases below this value.

Please define the rule and then use expression suggested by Nilesh.

Regards,

Kaushik Solanki

• ###### Re: number formating using set analysis

Hello:

If your looking for different number format in the same column, that should be based on some condition.

With that assumption, have written the following expression:

Expression:    =if(Sum(py1) > 1, Num(Sum(py1), '#,##0'), Num(Sum(py1), '#,##0%'))

Have attached the QVW with a similar example, hope that helps..

Thanks,

Narasimha K

• ###### Re: number formating using set analysis

Hi,

As said in earlier example you have to use a conditional statement as if so you can differentiate between the rows to identify when to use % and when not to.

then using num() function which gives you required formats.

One very important point to note here is that after using num function, you should make sure that under Number Tab you have chosen number format as Expression default, then only this num() function format will be picked.

..

Ashutosh

• ###### number formating using set analysis

Hi Vitul,

If you follow Narasimha K advice you should be able to get it to work.

or else, you can tell us that what is your criteria to decide if a row is a % amount ??

Then , we can help you to write this Query.

..

Ashutosh

• ###### number formating using set analysis

hi Kaushik

i know where to use the percentage sign...in which rows i want to show it...im goin to attach a screen shot..then it wud be more clear to all of you;

• ###### Re: number formating using set analysis

Hi,

Try something like that.

Please find the attached example.

..

Ashutosh

• ###### number formating using set analysis

plz tell me the logic.. i am using personal edition of qlikview so cant opn qvw....

• ###### number formating using set analysis

Hi,

It can be done in two ways,

first you can use expression as

if(dimension='rate',num( p1,'#0 ')&'%',num( p1,'#0'))

or

if(dimension='rate',num( p1/100,'#0 %'),num( p1,'#0'))

..

Ashutosh

• ###### number formating using set analysis

im using this expression

num#((sum({\$cola={1},col2={'J'},col3={'K'}>}Interest)/(sum({\$cola={1},col2={'J'},col3={'K'},LTAC_IND={'*'}-{'Y'}>}Ip))*100),'##%')

still its nt wrking wat is the error in it???

• ###### number formating using set analysis

Hi,

Don't use NUM# rather use NUM

Num# is to process input while Num is to show output.

...

Ashutosh

• ###### number formating using set analysis

still its nt wrking...plz help me in sorting out this prblm....

num((sum({\$cola={1},col2={'J'},col3={'K'}>}Interest)/(sum({\$cola={1},col2={'J'},col3={'K'},LTAC_IND={'*'}-{'Y'}>}Ip))*100),'##%')

still its nt wrking...

• ###### number formating using set analysis

Hi,

The problem seems with your expression which you have written.

Does this expression gives you value?

Can you first try it in a text object?

Just try it in a text object first, if it gives you any numeric value then num function will give you % value.

Try this, if it works!

num((sum({\$< cola={1},col2={'J'},col3={'K'} >}Interest)/sum({\$< cola={1},col2={'J'},col3={'K'},LTAC_IND={'*'}-{'Y'} >}Ip))*100,'##%')

..

Ashutosh