Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Conversion of time into percentage

Hi all,

How can i convert hours into percentage ?

Example ,

What is the 20% Of * 8 hours

please send me the set analysis expression

Thank you,

Ramu

1 Solution

Accepted Solutions
sunny_talwar

May be something like this:

=Floor(0.20 * Time('8', 'h')) & 'hr ' &  Frac(0.20 * Time('8', 'h')) * 60 & 'mins'


Capture.PNG

or this:

=Interval(0.20 * Time('8', 'h')/24, 'hh:mm:ss')

Capture.PNG

View solution in original post

3 Replies
sunny_talwar

May be something like this:

=Floor(0.20 * Time('8', 'h')) & 'hr ' &  Frac(0.20 * Time('8', 'h')) * 60 & 'mins'


Capture.PNG

or this:

=Interval(0.20 * Time('8', 'h')/24, 'hh:mm:ss')

Capture.PNG

maxgro
MVP
MVP

time (interval) is a number

8 hours in Qlik         

8/24 as 1 is a day = 24 hours

so 20% of 8 hours is

8/24 * 0.2

if you have a field f1

f1 * 0.2

then format as an interval in number tab

1.png

Clever_Anjos
Employee
Employee

I don´t think you need a Set Analysis, you can use regular math because time fields are stored into a numeric format

Time(yourField*0.2,'hh:mm:ss') will return 20% of yourfield time field