Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

joshrussin
Contributor II

If statement by dimension help

Hey guys,

I am trying to create a table in Qlikview.

I am attempting a nested If statement to get select data from database as a dimension.

Although there are some names I am having some issues with. Ex. Candace has different kind of clients and needs to be broken down into MI and Non-MI. So if you look in the pic below, it shows the different Candy rows.

I have tried this, and it doesn't work either.

If (Assigned_To_QM = 'Candace Bennett'

  , If(Match(Client_QM, 'HT Medical', 'SeaSpine', 'SMV Scientific')

    , 'Candy MI'

    , If(Match(Client_QM, 'ConforMIS, Inc.', 'Integra', 'Mako Surgical')

      , 'Candy Non-MI'

      , Assigned_To_QM))

If (Assigned_To_QM = 'Anwar Powell', 'Bravo',

If (Assigned_To_QM = 'Cody Grisanti', 'Charlie',

If (Assigned_To_QM = 'Christine Lane', 'Delta'))))

The goal is for the table to look similar to this. (the values will differ slightly due to updated database)

help.jpg

4 Replies
devarasu07
Honored Contributor II

Re: If statement by dimension help

Hi,

You can try like below,

=if(Assigned_To_QM='Candace Bennett' and WildMatch(Client_QM,'HT Medical*', 'SeaSpine*', 'SMV Scientific*'),'Candy MI',

     if(Assigned_To_QM='Candace Bennett' and WildMatch(Client_QM,'ConforMIS*, Inc*', 'Integra*', 'Mako Surgical*'),'Candy Non-MI',

     If (Assigned_To_QM = 'Anwar Powell', 'Bravo',

     If (Assigned_To_QM = 'Cody Grisanti', 'Charlie',

     If (Assigned_To_QM = 'Christine Lane', 'Delta',Assigned_To_QM)))))

Capture.JPG

Hope this helps to you

Best Regards,

Deva

joshrussin
Contributor II

Re: If statement by dimension help

This helps so much! Now I just need to figure out how to only get select people out of this list. Let's just say I want to take out 'Abigail Barton' how would I go about that?

joshrussin
Contributor II

Re: If statement by dimension help

I fixed it! Thank you so much!

joshrussin
Contributor II

Re: If statement by dimension help

I am trying to add some other people like Candy, Why is it only returning one result?

=if(Assigned_To_QM='Candace Bennett' and WildMatch(Client_QM,'HT Medical*', 'SeaSpine*', 'SMV Scientific*'),'Candy MI',

     if(Assigned_To_QM='Candace Bennett' and WildMatch(Client_QM,'ConforMIS*, Inc*', 'Integra*', 'Mako Surgical*'),'Candy Non-MI',

     If (Assigned_To_QM = 'Anwar Powell', 'Anwar',

     If (Assigned_To_QM = 'Cody Grisanti', 'Cody',

     If (Assigned_To_QM = 'Ashleigh McAlpin', 'Ashleigh',

     If (Assigned_To_QM = 'Chanel Dunn', 'Chanel',

     If (Assigned_To_QM = 'Christine Lane', 'Christine',

     If (Assigned_To_QM = 'Katie Motley', 'Christine',

     If (Assigned_To_QM = 'Keith Grandberry', 'Keith',

     If (Assigned_To_QM = 'Landon Janes', 'Landon (Non-MI)',

     If (Assigned_To_QM = 'Caleb Smith' and WildMatch(Client_QM,'HT Medical*', 'SeaSpine*', 'SMV Scientific*'), 'Caleb (MI)',

     If (Assigned_To_QM = 'Caleb Smith' and WildMatch(Client_QM,'Biomet*'), 'Caleb (Non-MI)',

     If (Assigned_To_QM = 'Michael Caffee', 'Michael',

     If (Assigned_To_QM = 'Oscar Stroede', 'Oscar',

     If (Assigned_To_QM = 'Will Bates', 'Will',

     If (Assigned_To_QM = 'Charles Finch', 'Trey'))))))))))))))))