Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
joshrussin
Creator III
Creator III

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
Master II
Master II

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
Creator III
Creator III
Author

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
Creator III
Creator III
Author

I fixed it! Thank you so much!

joshrussin
Creator III
Creator III
Author

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'))))))))))))))))