Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

Query across multiple columns

Hi, I am looking for help with a query I want to run on a dataset. I have a number of different columns I would like to set arguments for. All columns are numeric but I would like to set a threshold for each column in the query. For example:

 

Columns: A:9 B:8 C:6 D:6 E:9

 

Query: If 'A>7' and 'B>=8' and 'C=6' then 'True'

 

I have thought about making a True/False column based on each arguement and then filtering out all False columns but I would like to see all the data still really, with the True / False argument as a custom column within the dataset.

 

Grateful for any help 

 

2 Replies

  • Anonymous , Not very clear, Try like

    if([A]>7 && [B]>=8 && [C]=6 , true(), false())

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

    AnonymousYou can add a True/False column in Power Query Editor and apply the changes to Power BI Desktop. Then go to Desktop and use a slicer or filters to select True/False to determine which values you want to see in your report rather than filter out all False values in Query Editor.

     

    Best Regards,

    Community Support Team _ Jing Zhang

    If this post helps, please consider Accept it as the solution to help other members find it.