8 Replies Latest reply: Nov 17, 2016 5:13 PM by jade wind RSS

    Filtering a dimension that has IF statement from two different fields

    jade wind

      Hi everyone,

       

      I need to make a category dimension using two different fields and I can successfully do it using an expression like below:

       

      If(Field1 = 'A', 'C', if(Field2 = 'B', 'C', 'D'))

      //if either Field1 is A or Field2 is B, category = C, otherwise D.

       

      Now I want to filter the data to show only 'C' category. However the filtered data still shows some records that belong to 'D' category. It seems that when Field1 = 'A' and Field2 <> 'B', or Field1 <> 'A' but Field2 = 'B', these values from the two fields still show, although neither of them meet the criteria. I think it is because QS would still look at Field1 and Field2 although I ask it to look at the newly created Category dimension? If I'm not clear you can see example below:

       

      Where Field1 = A, Field2 can be B, E, F

      Where Field2 = B, Field1 can be A, G, H

       

      So the filtered result will have all combinations of Field1 = A, G, H and Field2 = B, E, F, including those that are neither A or B.

       

      So how do I ask QS to show only C category records??

       

      Thanks in advance for any help!