Forum Discussion
Filtering / Removing Filter in Power Query
- Anonymous2 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.
I tried this and again it works for selecting one but trying to get back to all give this error:
#"Filtered Rows2" = #"Table.SelectRows"(#"Grouped Rows2", each if [CONSOL ENTITY] = FILTER_CONSOL_ENTITY then each true else each List.Contains({FILTER_CONSOL_ENTITY}, [CONSOL ENTITY])),
Expression.Error: We cannot convert a value of type Function to type Logical.
Details:
Value=[Function]
Type=[Type]
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.