Forum Discussion

venkatnitt84's avatar
venkatnitt84
Frequent Visitor
5 years ago

DAX Filter Suggestion needed

Hi All -

 

We have requirement where a custom filter is required based on the Position of the text and value in that postion. below is the requirement with Sample data

 

Value selected (001 A and 002C). When user selects 001A and 002C , the dax should basically read each record and display only

where region cd has 'A' as the value for first position and 'C' as the value for second position

It should be And condition.  for below selection 001A and 002C , Region 1 and region 2 will be displayed.

Region 3 will not be displayed as the second position value is 'C'

 

                       

Region Cd Slicer  
001A    <- Selected (001 is the position and 'A' is the value ) 
001B
002C     <- Selected (002 is the position and 'C' is the value )   
002A
003D
003E
004F

Table Data

Region     Region Cd

Region 1  ACNDZCAKF
Region2   ACRQS
Region3   ABTGKU

 

 

 

 

2 Replies

  • v-jingzhang's avatar
    v-jingzhang
    Community Support

    Hi venkatnitt84 

     

    The Region Cd Slicer is a multi-select slicer, will users select more than one value for the same position? For example, select 001A and 001B at the same time? If so, do we need to display all regions whose first position value of Region Cd is A or B?

     

    Besides, I see 003 and 004 in the slicer, will there be 005, 006, ... in the slicer? How many values will be selected at the same time? Will users select multiple values at uncontinuous positions, e.g. 001A & 004F?

     

    It becomes more complicated when thinking of more conditions.

     

    Regards,
    Community Support Team _ Jing

    • venkatnitt84's avatar
      venkatnitt84
      Frequent Visitor

      Hi , Thank you for your reply and below is my response to your questions

      1) yes region cd is multiselect , same position cannot have more than 1 value. For eg. if user selects 001 and 001B, No records will be return. This is invalid scenario as the criertia is "AND" condition and no single record will have A and B as value.

      2) There are 200 positions (001A to 200XX" ) . But Users can select maximum of 5 values in the slicer.

       say if user selects "001A" and "003B" and "005Z" , then i need to display all records where the 1 position value is A and 3 position value is B and 5 position value is Z.