Forum Discussion

stefantaust's avatar
stefantaust
Helper I
1 year ago
Solved

filter across multiple columns

Hello, how can I filter the data and display all that contain an "X" and write the data in a new Table

Regards Stefan

 

 

3 Replies

  • You could use a measure

    Row has X = 
    // create a temp table of rows that have X is any of the 3 columns 
    var temptable = 
    FILTER('Table', 'Table'[Col1] = "X" || 'Table'[Col2] = "X" || 'Table'[Col3] = "X") 
    
    RETURN 
    // then return TRUE if the corresponding row has an item 
    NOT(ISEMPTY(myset)) 
    
    //Then on your viual filter rows that are TRUE

     

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi stefantaust 

    The solutions provided by   above are both valid and should help you achieve the result:

    • The Power Query method using Unpivot Other Columns and then filtering for "X" is great if you want to handle this at the data transformation stage.
    • The DAX measure approach works well if you prefer to control the logic in your report visuals using a measure-based filter.

    I’d suggest giving these methods a try. If you still face any issues or need help adjusting them to your exact setup, feel free to post back and we’ll be happy to support further.

    Best regards,
    Akhil