Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Filtering / Removing Filter in Power Query

I have created a dataflow to get my dataset. I have loaded the data into a query in excel, I then want the user to be able to change filters from drop down list(s) in excel. These filters apply to...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Anonymous ,

     

    The error message is pointing you to the problem:
    It looks like the issue is with the logic in your Table.SelectRows function. The error message indicates that there’s a type mismatch, specifically that a function is being used where a logical value is expected.

    You may try this:

    #"Filtered Rows2" = Table.SelectRows(#"Grouped Rows2", each 
        if [CONSOL ENTITY] = FILTER_CONSOL_ENTITY then true 
        else List.Contains(FILTER_CONSOL_ENTITY, [CONSOL ENTITY])
    )
    

     

    Best Regards,

    Stephen Tao

     

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