Skip to main content
Announcements
New: No-code data prep in Qlik Cloud Analytics™ TAKE A TOUR
cancel
Showing results for 
Search instead for 
Did you mean: 
Shilpa16
Contributor III
Contributor III

Calculating the decimal part value of a Percentage

Hello Everyone,

I have a scenario where I need to lookup the percentages to absolute numbers as shown below:

%        Value

1%     200

2%    270

3%    340

Suppose I get % as 2.7 then I need to do the following calculation:

340-270=70

70/10=7

7*0.7=4.9

270+4.9=274.9

Could anyone please suggest how can I do such a calculation? Is there any direct function to be used?

 

Thanks

Shilpa

 

 

1 Reply
olivetwist
Creator
Creator

I was able to make it work using an input box for the % as variable "vIN" then used the formula below in a text object.

app attached.

=SUM(IF(FLOOR(vIN)=LEFT(%,1),VALUE))+((SUM(IF(CEIL(vIN)=LEFT(%,1),VALUE))-SUM(IF(FLOOR(vIN)=LEFT(%,1),VALUE)))/10)*FMOD(vIN,FLOOR(vIN))