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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to calculate percentage

I have 3 fields.

%Growth,%GrowthCY and TotalFTECY

TotalFTECY=3735

%GrowthCY=100%

%GrowthNY = 3%


now I need to calculate TotalFTENY


So basically it is (3735*3)/100

How can I do this in qlikview?

Thanks much.

11 Replies
sunny_talwar

If they are fields why not do like this in the script:

LOAD [%GrowthNY],

          [%GrowthCY],

          [TotalFTECY],

          ([TotalFTECY] * [%GrowthNY])/100 AS [TotalFTENY]

FROM Source

Not applicable
Author

I tried this and it displays nothing.Thank you.

sunny_talwar

Can you share few lines of data to look at?

Not applicable
Author

Capture.PNG

Qrishna
Master
Master

do you have anything where its has how growth is calculated?

Not applicable
Author

no..its an excel file

sunny_talwar

Can you store your data like this maybe?

TotalFTECY,    %GrowthNY,    Year

3735,                      3,          2015

Table:

LOAD *,

  ([TotalFTECY] * [%GrowthNY])/100 AS [TotalFTENY];

LOAD * Inline [

TotalFTECY, %GrowthNY, Year

3735, 3, 2015

];

Output:

Capture.PNG

Qrishna
Master
Master

load TotalFTECY,

     %GrowthCY,

     %GrowthNY,

     (TotalFTECY * purgechar(%GrowthNY,'%'))/purgechar(%GrowthCY,'%') as TotalFTENY

from xyz.xls;

edit:

As there's no %GrowthCY in your excel,

you can also try

load TotalFTECY,

     %GrowthNY,

     (TotalFTECY * purgechar(%GrowthNY,'%'))/100 as TotalFTENY

from xyz.xls;

Not applicable
Author

This is pulling from the share point list and once they add more data it has to update accordingly