Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Add decimal numbers

Good morning, folks,


I have a big question.


I have a table with phone calls and a field with minutes long each call takes decimals and converts them into actual minutes, for example:


1- I have a call with duration of 2.63 minutes to convert to actual minutes I do the following account:

2.63 / 60 * 100 = 4.38 minutes


2- I have another call lasting 0.75 minutes to convert to actual minutes I make account instead:


0.75 * 60/100 = 0.45 the 2nd


How do you understand the system that when the minutes have a value other than zero before the decimal point (2.63) it must make an account and when you have zero before the decimal point (0.75) it must make another?

---

Edit by Community Team member:

Post translated by Google Translate.

Please post in English unless in a language specific section.

1 Solution

Accepted Solutions
Clever_Anjos
Employee
Employee

Maybe:

=if(

  ceil(Value) > 0 , Value / 60 * 100 , Value  * 60/100

)

View solution in original post

3 Replies
Clever_Anjos
Employee
Employee

Maybe:

=if(

  ceil(Value) > 0 , Value / 60 * 100 , Value  * 60/100

)

Anonymous
Not applicable
Author

How does a call of "duration of 2.63 minutes", "convert to actual minutes" of "4.38 minutes" ?

I would have thought something more like this :

     floor(2.63) + (frac(2.63) * 0.6  )      gives     2.38   

     floor(0.75) + (frac(0.75) * 0.6  )      gives     0.45

  

Unless I have misunderstood.

MarcoWedel

Hi,

I'm not quite sure I understood the question either, but maybe you are looking for something like this:

QlikCommunity_Thread_192939_Pic1.JPG

tabPhoneCalls:

LOAD *,

     Interval(durationMin*'00:01') as duration

Inline [

durationMin

2.63

0.75

];

hope this helps

regards

Marco