Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am trying to create a group in the script , and this gets executed in the output i don't see GR1 and GR2 .
how do i get this ?
Thanks in Advance
Is there no way to achieve this within one group?
hi,
how should it work to set the datas into one group.
Either if statement one is right, so you get result one or the if-statement for GR is right so you get result two.
An if-statement quits if the first result is true.
Regards
Hi,
you can do something like this:
MainTable:
load * From ...;
Groups:
Load goup,
if(WildMatch(goup,'host'),'host',
if(WildMatch(goup,'payments'),'payments',
if(WildMatch(goup,'roles'),'roles',
if(WildMatch(goup,'hr'),'hr',
if(WildMatch(goup,'dudes'),'dudes',
if(WildMatch(goup,'check'),'check',
if(WildMatch(goup,'pass'),'pass'))))))) as Create_Group
resident Main Table;
Concatenate (Groups)
load goup,
'GR1' as Create_Group
resident MainTable
where WildMatch(goup,'pass','dudes','check');
Concatenate (Groups)
load distinct goup,
'GR2' as Create_Group
resident MainTable
Where WildMatch(goup,'pass','host','hr')
Did Ariel's last post work for you? If so, be sure to use the Accept as Solution button on that post to give him credit for the help and let others know that worked. If you did something different, consider posting that and mark that as the solution and if you are still working on things, leave an update for us.
Regards,
Brett
Your GR1 condition is true if goup = 'pass' OR 'dudes'. However, that condition would have been met in the earlier if() and therefore the GR1 if() is not executed.
If you are trying to create a one-to-many relationship where one goup links to many Create_Group, you should load a separate table like this:
Groups:
LOAD * INLINE [
goup, Create_Group
host, host
payments, payments
dudes, dudes
pass, pass
pass, GR1
dudes, GR1
etc
];
-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com