Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Any Hint.....
Thanks,
Dhanu
Can you create INLINE DATA for sample
Thanks Tom...I am looking for sample data model script how we can get this.
If(product code = 430,470 , 'NA' , segment ) AS logic1
Do you want code like above ?
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
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
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 !!!
Don't forgot to drop tables TEMP 1 , 2