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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Cannot remove filter after changing data model

I have found what I believe is a bug. This is the behaviour.

 

1. Created a visual (matrix) with a visual filter on one of the fields that is in the data model.

2. Edited the data model so that the field is removed

3. Go back to the visual. The visual cannot be rendered as the field is gone, but it it not possible to remove it to fix the issue either.

I suspect that it cannot be removed because the field was added as a filter before it was removed. In either way it is not possible to remove the field from either the filters pane so the visual does not render.

 

See the following screenshot for an example.

https://frede.tinytake.com/tt/MzkwOTcyNV8xMTk4NjQ5Nw

Status: New
Comments
v-yuta-msft
Community Support

@Frede ,

 

I have made a test on this issue but couldn't reproduce this issue. The filter can be removed after the column being deleted in power query/data source.

 

Please update power bi desktop to the latest version.

 

Regards,

Jimmy Tao

Frede
Helper I

Hi Jimmy,

 

I have the November 2019 release so that is not the issue. I cannot reproduce the issue either but you can clearly see the problem in the video. It can depend on other fields that was altered in Power Query as well as I made several changes. I have however deleted and re-created the matrix visual.

 

Thanks

Fredrik

lilydavisson
Employee

Still having this issue in 2023. It broke ALL of my charts somehow, even the ones not using that data source. Added a relationship between two date/time types and it broke everything, all of my charts can't be displayed because it says something about that field is invalid. I can't afford to remake every chart. Deleting the column entirely does not let me remove the filter either

lilydavisson_0-1692920671449.pnglilydavisson_1-1692920694215.png

<does nothing>

lilydavisson_2-1692920710549.png

 

Frede
Helper I

Instead of re-creating all visuals maybe it is easier to 

 

1. re-create the columns in the data source

2. Validate that the report does render

3. remove the filter

4. Delete the columns again.

 

Have not tried this myself though.

SofBL
Frequent Visitor

If the datamodel changes you are sometimes in big trouble with linked visuals. Even Measures are removed from a report with a live connection to that datamodel. Recreating measures gives a simular but different error. 

I solved this by diving a little deeper in the structure and hard replaced filters which I used with an existing field in the filters.json file that every visual has  using this post

https://data-goblins.com/power-bi/replace-report-measures

and the pbi-tools

https://pbi.tools/

and some powershell scripts to automate the replace of fields in filter

Get-ChildItem -Path C:\Tools\extract\Report\sections\* -include filters.json -recurse | rename-item -newname { [io.path]::ChangeExtension($_.name, "txt") }
Get-ChildItem -Path C:\Tools\extract\Report\sections\* -include filters.txt -recurse |
Foreach-Object {
write-output ($_.FullName)


$a = ($_ | Get-Content)

$c = $a -replace 'unexistingfield ', 'existingfield'
[IO.File]::WriteAllText($_.FullName, ($c -join "`r`n"))
}

Get-ChildItem -Path C:\Tools\extract\Report\sections\* -include filters.txt -recurse | rename-item -newname { [io.path]::ChangeExtension($_.name, "json") }