Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
pawwy1415
Creator III
Creator III

Percentage calculation help

Hi Experts,

Can any one please help me on below requirement.

I am trying to calculate the "Percentage" field

In the Qlik while reloading getting invalid expression please let me know am i missed any thing in the round() syntax below.

Thanks in advance.

1 Solution

Accepted Solutions
olivierrobin
Specialist III
Specialist III

as you are using a group by datasecurity...

it seems hard to use pnlduetorisk...  with no aggregation function and with an aggregatino function in the same expression

I would proceed in 2 times :

1st, compute the sum

2ns, calculate the ratio

View solution in original post

6 Replies
tripatirao
Creator II
Creator II

Hi,

I hope you are missing some bracket.

Please do like below,It may work

ROUND((Field1/SUM(Field2)*100),0.01)

Regards

Tripati

olivierrobin
Specialist III
Specialist III

hello

could you show the error message ?

olivierrobin
Specialist III
Specialist III

as you are using a group by datasecurity...

it seems hard to use pnlduetorisk...  with no aggregation function and with an aggregatino function in the same expression

I would proceed in 2 times :

1st, compute the sum

2ns, calculate the ratio

olivierrobin
Specialist III
Specialist III

Volcker_Report2_Temp:

Load

[r2_DATASECURITYID]                                                                    as [r2_Desk_ID],

sum([r2_PNLDUETORISKFACTORMOVE) as [AttribToRFMove]                                               

Resident VLK_MADRID_FORMAT_REPORT2

Group by  [r2_DATASECURITYID];

left join(Volcker_Report2)

load [r2_Desk_ID],[AttribToRFMove]

resident Volcker_Report2_Temp

so now in the same table you have the individual value and the grouped value

you have just to compute the percentage (whether in the table or in charts)

olivierrobin
Specialist III
Specialist III

try to make a simple chart with the key, the individual value, the total value to see if they are correct

olivierrobin
Specialist III
Specialist III

try something like  sum(profitloss)/sum(TOTAL <column> profitloss)

as I can see, you use qliksense.

This forum is more oriented qlikview.