Qlik Community

QlikView Deployment

Discussion Board for collaboration related to QlikView Deployment.

gauravgg
New Contributor III

how to Assign value to the rows ?

I have a column in which i have Time as follows

Time

12.00 AM

12.14 AM

13.12 AM

03.30 PM

04.00 PM

02.30 AM

.

.

.

n numbers of rows

I want to assign  it as following

Time                        Assign Value

12.00 AM                    12.00 AM

12.14 AM                    12.00 AM

13.12 AM                     13.00 AM

03.30 PM                     03.30 PM

04.00 PM                     04.00 AM

02.30 AM                     02.30 AM

.

.

n numbers of rows

Thanx in Advance

Labels (2)
14 Replies

Re: how to Assign value to the rows ?

Something like this:

LOAD

     Time,

     Time(Floor(Time,1/48)) As [Assign Value]

FROM

     .....


talk is cheap, supply exceeds demand

Re: how to Assign value to the rows ?

Are you rounding them down to nearest 30 minutes?

May be this:

LOAD Time,

          Time(Floor(Time, (1/(24*2)))) as AssignValue -> my bad, Gysbert is right

          Time(Floor(Time, (1/(24*30)))) as AssignValue

FROM Source;

gauravgg
New Contributor III

Re: how to Assign value to the rows ?

Thanx

gauravgg
New Contributor III

Re: how to Assign value to the rows ?

Thanx

Re: how to Assign value to the rows ?

Please close the thread if you got what you were looking for by marking correct and helpful answer. Thanks

Qlik Community Tip: Marking Replies as Correct or Helpful

gauravgg
New Contributor III

Re: how to Assign value to the rows ?

hi

but for 8.00, 8.15, 8.30  it is assigning 8.00

it should not assign 8.30 to 8.00

Re: how to Assign value to the rows ?

‌please provide an example where the proposed expression converts 8.00 into 8.30

thanks

regards

Marco

gauravgg
New Contributor III

Re: how to Assign value to the rows ?

I have a column in which i have Time as follows

Time

12.00 AM

12.14 AM

13.12 AM

03.30 PM

04.00 PM

02.30 AM

12.30 AM

12.40 AM

.

.

.

n numbers of rows

I want to assign  it as following

Time                        Assign Value

12.00 AM                    12.00 AM

12.14 AM                    12.00 AM

13.12 AM                     13.00 AM

03.30 PM                     03.30 PM

04.00 PM                     04.00 AM

02.30 AM                     02.30 AM

12.30 AM                     12.30 AM

12.40 AM                      12.30 AM

.

n numbers of rows

Re: how to Assign value to the rows ?

Time component is in decimals so it is prone to rounding errors when you round, ceil or floor things. Check this link out where HIC talks about rounding error Rounding Errors‌.

Community Browser