Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
upaliwije
Creator II
Creator II

Percentage in Column

I have following pivot table where I want to calculate the percentage as given below  in the last column

but when I write the following expression desired result is not shown in the % marked in red

My expression is COUNT(NOS)/COUNT(TOTAL NOS)

Pls help me rectify my expression

PAID_YEAR201120112011
AGENT_GROUPAGENT_PAYEEPAID_AMOUNTNOS%Expected %
AGENTAMW13,908,2663320.41%2%
AGENTCARMART_LANKA4,525,290270.03%0%
AGENTCOLONIAL MOTORS191,82720.00%0%
AGENTABANS294,06570.01%0%
AGENTDAVID PEIRIS575,574120.01%0%
AGENTTotal19,495,0223800.47%2%
OTHERSOTHERS656,896,1421996224.58%98%
OTHERSTotal656,896,1421996224.58%98%
Total676,391,1642029725.00%100%
1 Solution

Accepted Solutions
pgalvezt
Specialist
Specialist

Is this what you want?

View solution in original post

13 Replies
Not applicable

You the Relative Property in the expression(this calculates the Percentage).

Also, Can you also look into 'Show in Percent(%)' option in the Number Format Settings in the Number Tab of the Properties

-Ram

JonnyPoole
Former Employee
Former Employee

replace: COUNT(NOS)/COUNT(TOTAL NOS)


with:  Sum(NOS) / Sum( Total NOS)

upaliwije
Creator II
Creator II
Author

NOS IS NOT A NUMERIC  VALUE BUT A STRING

upaliwije
Creator II
Creator II
Author

WHAT YOU SAY IS NOT CLEAR TO ME

Anonymous
Not applicable

then try the num#() function...something like -

sum(num#(NOS))/sum(total num#(NOS))

upaliwije
Creator II
Creator II
Author

IT IS NOT WORKING

MY NOS IS LIKE THIS        KH1A34222

pgalvezt
Specialist
Specialist

Hi,

Try with Only or MaxString Functions ()

Anonymous
Not applicable

they are not like that in your post. can you provide correct formats for your fields? if the formats you provide are not correct, solutions will not work either.

upaliwije
Creator II
Creator II
Author

I cant understand it . Pls write the full expression