Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
dhanu_today
Creator
Creator

Data Model help

Hi Everyone ..

I need to build the below logic's in script level only as per the attached data model.Am unable to add the sample data.

Logic 1:

e.g. if product code contains 430,470 then we have to show “N/A” else segment.

Logic 2:

If LRM code is equal to RM code then consider   RM Segment(Consider Like LRM Segment)

If Asset code is equal to RM code then consider RM Segment(Consider Like Asset Segment)

Logic 3:

If Segment is equal to LRM Segment then LRM Segment

Else

If Segment is equal to Asset Segment then Asset Segment

Else

LRM Segment


Thanks,

Dhanu

8 Replies
dhanu_today
Creator
Creator
Author

Any Hint.....

Thanks,

Dhanu

Not applicable

Can you create INLINE DATA for sample

dhanu_today
Creator
Creator
Author

Thanks Tom...I am looking for sample data model script how we can get this.

Not applicable

If(product code = 430,470 , 'NA' , segment )  AS logic1

Do you want code like above ?

dhanu_today
Creator
Creator
Author

I have the script for all the logics in design level.I want to do the same in script level.

I have stucked some where how to map product code,segment both are coming from different table of course the linkage is not directly.

Thanks,

Dhanu

Not applicable

Hi,

You can JOIN tables with load statements then do your calculations,

Or use APPLY MAP to introduce one or two more fields needed for your calculations into desired table.

After calculations you can clean up the data model and drop unnecessary/redundant fields.

Check the following post to decide which option works for you:

http://community.qlik.com/blogs/qlikviewdesignblog/2012/09/18/one-favorite-function-applymap

Ersen

Not applicable

Take Resident load of

Temp:

     Load Custid,

               LRM Code

Resident of Master 2 ;

Left join (Temp)

Temp1:

     Load Custid,

               Souring RM

Resident of Master 1 ;

Left Join(Temp1)

Temp2:

     Load 

               Souring RM

               RM Code

Resident of Master 4 ;

Now your Temp Table having both fields as you want .

Hope it's help full !!!

Not applicable

Don't forgot to drop tables TEMP 1 , 2