Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Hello My name is Jim and I am new to Qlikview

Hello Everyone,

     My name is Jim.

     Right now i have to use Qlikview at my work to build KPIs and i got lots of questions.

     for my date column, it filled with date, month, year and time. how do i separate all of them into different columns in qlikview??

Turn:

1/31/2004 12:00:00 AM

Into 4 different columns

Please help and thank you!

1 Solution

Accepted Solutions
celambarasan
Not applicable

Re: Hello My name is Jim and I am new to Qlikview

You need to use preceding load above your sql query.

Will look something like

CompletedOrders:

Load

     *,

     Day(DeliveryDate) AS Day,

     Month(DeliveryDate) AS Month,

     Year(DeliveryDate) AS Year;

SQL SELECT    DeliveryDate,

                        CubedWeight,

                        DeliveryProvince,

                        OrderNo,

                        PickupPostalCode,

                        Pieces,

                        Weight

FROM CourierComplete.dbo.CompletedOrders;

16 Replies
mayilvahanan
Not applicable

Re: Hello My name is Jim and I am new to Qlikview

HI

Try like this

Load DateField,

Year(DateField) as Year,

Month(DateField) as Month,

Time(DateField) as TIme

from tablename;

Hope it helps

celambarasan
Not applicable

Re: Hello My name is Jim and I am new to Qlikview

You should be done this in script side.

Load

     Day(DateField) AS Day,

     Month(DateField) AS Month,

     Year(DateField) AS Year

From Datasource.

Not applicable

Re: Hello My name is Jim and I am new to Qlikview

CompletedOrders:

SQL SELECT          DeliveryDate

                              CubedWeight,

                        DeliveryProvince,

                                 OrderNo,

                        PickupPostalCode,

                        Pieces,

                        Weight

FROM CourierComplete.dbo.CompletedOrders;

this is my code right here, so where do i enter the code??

mayilvahanan
Not applicable

Re: Hello My name is Jim and I am new to Qlikview

HI

Load * ,Day(DeliveryDate) as Day,

Year(DeliveryDate) as Year,

Month(DeliveryDate) as Month,

Time(DeliveryDate) as TIme;

SQL

SELECT    

     DeliveryDate

                              CubedWeight,

                        DeliveryProvince,

                                 OrderNo,

                        PickupPostalCode,

                        Pieces,

                        Weight

FROM CourierComplete.dbo.CompletedOrders;

Hope it helps

Not applicable

Re: Hello My name is Jim and I am new to Qlikview

CompletedOrders:

SQL SELECT    DeliveryDate

                        CubedWeight,

                        DeliveryProvince,

                        OrderNo,

                        PickupPostalCode,

                        Pieces,

                        Weight

FROM CourierComplete.dbo.CompletedOrders;

this is my code right here, so where do i enter the code??

Not applicable

Re: Hello My name is Jim and I am new to Qlikview

Hi,

     I tried to reload your code and it does not work on me. Sorry for the inconvience.

celambarasan
Not applicable

Re: Hello My name is Jim and I am new to Qlikview

You need to use preceding load above your sql query.

Will look something like

CompletedOrders:

Load

     *,

     Day(DeliveryDate) AS Day,

     Month(DeliveryDate) AS Month,

     Year(DeliveryDate) AS Year;

SQL SELECT    DeliveryDate,

                        CubedWeight,

                        DeliveryProvince,

                        OrderNo,

                        PickupPostalCode,

                        Pieces,

                        Weight

FROM CourierComplete.dbo.CompletedOrders;

mayilvahanan
Not applicable

Re: Hello My name is Jim and I am new to Qlikview

Hi

Its not working? Any error?

Load *, Day(DeliveryDate) as Day,

Year(DeliveryDate) as Year,

Month(DeliveryDate) as Month,

Time(DeliveryDate) as TIme;

SQL

SELECT    

     DeliveryDate,

    CubedWeight,

    DeliveryProvince,

     OrderNo,

    PickupPostalCode,

    Pieces,

    Weight

FROM CourierComplete.dbo.CompletedOrders;

Can you please explain about the error, if you get means?

Not applicable

Re: Hello My name is Jim and I am new to Qlikview

Thank you SO MUCH!