Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Willborn
Advocate II
Advocate II

Filter does not work

Hi there

 

I wanted to set a filter on a column in PBI Deskto (editing queries). The text filter is set on the content of the field (subject text contains "client").

 

= Table.SelectRows(#"Inserted Days", each Text.Contains([Subject], "client"))

 

 

There has been 1 prepared record for tests which contained this text "client" and 12 others, out of thousands. The prepared record is shown in the preview correctly, togheter with others. Totally 13 rows are displayed.

 

So far no problem, but:

 

As soon as I click on "Close & Apply", PBI Desktop only shows 12 rows, and excactly my testing record dissapeared.

Does someone know what happened here?

 

Thanks for any hint!

Patrick

2 ACCEPTED SOLUTIONS
austinsense
Impactful Individual
Impactful Individual

This is tough without being able to see the query but my thoughts are ...

1) are there other steps in the query that could be hiding the row?

2) is the word "client" all in lowercase - PQ is case sensitive

3) how did your test row make it into the dataset? is it from the same data source as the other data?

4) finally, i've noticed that sometimes the query preview feature doesn't work exactly right - that could be what you're dealing with

Austin is VP Operations at PowerPivotPro and a professional self-service enthusiast 🙂

View solution in original post

 

Here the screenshots for easier understanding of how preview is ignoring case sensitive text filter and for those might having the same issue.

Filter by lower case "client reponse" will find the test data record with text "Client Reponse" in Query Editor preview...
PQ_Filter_1.PNG

 

...but not as a result:

PBI_Filter_2.PNG

Filtering by upper case "Client Reponse" will find the test data record in Query Editor preview.

PQ_Filter_3.PNG

...and also the data record, as the filter is case sensitive. But this is ignored by the preview...

PBI_Filter_3.PNG

 

Best regards

Patrick

View solution in original post

7 REPLIES 7
austinsense
Impactful Individual
Impactful Individual

This is tough without being able to see the query but my thoughts are ...

1) are there other steps in the query that could be hiding the row?

2) is the word "client" all in lowercase - PQ is case sensitive

3) how did your test row make it into the dataset? is it from the same data source as the other data?

4) finally, i've noticed that sometimes the query preview feature doesn't work exactly right - that could be what you're dealing with

Austin is VP Operations at PowerPivotPro and a professional self-service enthusiast 🙂

Hi Austin

 

Thank you! Your 2nd point just guided me to the answer - which seems to be a bug in the preview. The filter in Query Editor is not case sensitive, but PQ is... I'll send a fraun to MS.

 

Btw: The data is loaded from our on-premise CRM Test system, the data source is the same for all records.

 

@Willborn Can you elaborate a little bit on "Query Editor is not case sensitive"? 

 

The queries editor *IS* the power query editor window, and it should reflect the true output from the underlying query engine. Can you share the full query?

@Willborn Just saw your update, this is weird.

 

Can you post the full query here?

Will do some further testing with other data sources - but most probably with the same result... keep you informed.

@Willborn I tested with a sample OData source:

let
    Source = OData.Feed("http://services.odata.org/northwind/northwind.svc/"),
    Customers_table = Source{[Name="Customers",Signature="table"]}[Data],
    #"Filtered Rows" = Table.SelectRows(Customers_table, each Text.Contains([ContactTitle], "owner"))
in
    #"Filtered Rows"

Here all "Owner" rows are returned in both the Preview and the final loaded data model, so OData text filtering is case insensitive (it's source dependent, since the substringof operator in OData is case insensitive.) FYI, the above query is executed directly on the service with the URL

http://services.odata.org/northwind/northwind.svc/Customers?$filter=substringof(%27owner%27,ContactT...

 

I find that Preview and Data Model yielding different results extremely troublesome...I hope to get to the bottom of this, as I suspect it may not be the case sensitivity issue you mentioned.

 

Here the screenshots for easier understanding of how preview is ignoring case sensitive text filter and for those might having the same issue.

Filter by lower case "client reponse" will find the test data record with text "Client Reponse" in Query Editor preview...
PQ_Filter_1.PNG

 

...but not as a result:

PBI_Filter_2.PNG

Filtering by upper case "Client Reponse" will find the test data record in Query Editor preview.

PQ_Filter_3.PNG

...and also the data record, as the filter is case sensitive. But this is ignored by the preview...

PBI_Filter_3.PNG

 

Best regards

Patrick

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.