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

why it not mapping properly

Hi all

i try to get hour field in master calendar but Master calendar link key is  not mapping with Data Tables

Screenshot_2.png

What i did wrong? why its duplicated?

1 Solution

Accepted Solutions
sunny_talwar

Try this

GasResponse:

LOAD ISR_NO,

    CREATED_DATETIME,

    Timestamp(Floor(CREATED_DATETIME, 1/24),'MM/DD/YYYY HH') as MasCalLink,

    Timestamp(Floor(CREATED_DATETIME, 1/24),'MM/DD/YYYY HH') as MasCalLink1,

    RESPONSE_TIME

FROM

[try.xls]

(biff, embedded labels, table is Sheet1$);


Calendar:

LOAD Year(TimeStamp) as Year,

  MonthName(TimeStamp) as MonthYear,

  Month(TimeStamp) as Month,

  Day(TimeStamp) as Day,

  Date( Floor( Date(TimeStamp)),'MM/DD/YYYY') as Date,

  Hour(TimeStamp) AS Hour,

  Timestamp(Floor(TimeStamp, 1/24),'MM/DD/YYYY HH') as MasCalLink ;

LOAD

    Timestamp($(vMinDate) + (RecNo() - 1)/24) as TimeStamp

AUTOGENERATE 23 * $(vDays);

Capture.PNG

View solution in original post

4 Replies
swuehl
MVP
MVP

That's because you only formatted the text representation, and the numeric part kept unchanged (and the numeric part is used for the key match).

try to adapt the numeric part, too, e.g.

Timestamp#(Timestamp(TimeStamp,'MM/DD/YYYY HH'),'MM/DD/YYYY HH') as MasCalLink

sunny_talwar

Try this

GasResponse:

LOAD ISR_NO,

    CREATED_DATETIME,

    Timestamp(Floor(CREATED_DATETIME, 1/24),'MM/DD/YYYY HH') as MasCalLink,

    Timestamp(Floor(CREATED_DATETIME, 1/24),'MM/DD/YYYY HH') as MasCalLink1,

    RESPONSE_TIME

FROM

[try.xls]

(biff, embedded labels, table is Sheet1$);


Calendar:

LOAD Year(TimeStamp) as Year,

  MonthName(TimeStamp) as MonthYear,

  Month(TimeStamp) as Month,

  Day(TimeStamp) as Day,

  Date( Floor( Date(TimeStamp)),'MM/DD/YYYY') as Date,

  Hour(TimeStamp) AS Hour,

  Timestamp(Floor(TimeStamp, 1/24),'MM/DD/YYYY HH') as MasCalLink ;

LOAD

    Timestamp($(vMinDate) + (RecNo() - 1)/24) as TimeStamp

AUTOGENERATE 23 * $(vDays);

Capture.PNG

tripatirao
Creator II
Creator II

Hi Sunny,

How below code works

LOAD

    Timestamp($(vMinDate) + (RecNo() - 1)/24) as TimeStamp

AUTOGENERATE 23 * $(vDays);



Can you please explain


Regards

Tripati

Peter_Cammaert
Partner - Champion III
Partner - Champion III

For a fixed series of vDays full day calendar entries (all hours), you may want to change the 23 into 24.