Skip to main content
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

Inline Load with IF function?

Hi,

is it possible to integrate an IF function into an Inline Load?

Following scenario:

I have different kind of dates, i.e. created, modified, start, end etc.

I want to concatenate all these into one "calendar" (see below)

Month(Date(Date#(ows_Modified,'YYYY-MM-DD hh:mm:ss'),'MM/YYYY')) as DateMonth,

Month(Date(Date#(ows_Created,'YYYY-MM-DD hh:mm:ss'),'MM/YYYY')) as DateMonth

...

Problem: If I select "May" I see the right reportname, but I don't know if it is the modified or created date.

So I thought of creating an inline table like this below (pseudocode):

INPUT:

LOAD * Inline [

heading

IF(StartDate<>0,start,"")

IF(CreateDate<>0,created,"")

IF(ModifiedDate<>0,modified,"")

IF(EndDate<>0,end,"")

IF(CompleteDate<>0,completed,"") 

];

Perhaps my thoughts are too complicated and there is an easier solution?!

Thankful for any help,

Dave

1 Solution

Accepted Solutions
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     I dont know with what way you are concatenating the master calanders. But you can try something shown below.

     All you have to do is create a flag, which says from where the respective data has came.

     For example.

     MasterCal:

     Load StartDate as Date,

              'Start Date' as Flag

     Resident ABC;

     Concatenate

    

     Load EndDate as Date,

              'End Date' as Flag

     Resident PQR;

      Concatenate

    

     Load Create_Date as Date,

              'Create Date' as Flag

     Resident XYZ;

     And so on.

     Hope this is clear to you.

Regards,

Kaushik Solanki    

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!

View solution in original post

3 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     I dont know with what way you are concatenating the master calanders. But you can try something shown below.

     All you have to do is create a flag, which says from where the respective data has came.

     For example.

     MasterCal:

     Load StartDate as Date,

              'Start Date' as Flag

     Resident ABC;

     Concatenate

    

     Load EndDate as Date,

              'End Date' as Flag

     Resident PQR;

      Concatenate

    

     Load Create_Date as Date,

              'Create Date' as Flag

     Resident XYZ;

     And so on.

     Hope this is clear to you.

Regards,

Kaushik Solanki    

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
er_mohit
Master II
Master II

try like this using if condition  throgh inline load

load IF(StartDate<>0,start,"") ,* inline [

StartDate,Start

];

Not applicable
Author

Thanks to you! Both solutions are working but Kaushik' s one is the best for my problem!