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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Balogh1Bence
Helper II
Helper II

how to get unfiltered values

i am using host.applyJsonFilter provided by powerbi to filter my visual and other visuals on the report.

I have 4 values in my filter:

  • apple
  • orange
  • kiwi
  • banana

than I filter my visual and the other visuals.
Now i only have these:

  • apple
  • banana

how can I access the unfiltered data?

8 REPLIES 8
v-shex-msft
Community Support
Community Support

Hi @Balogh1Bence,

I think there should more suitable processing on power bi 'edit interaction' feature instead of integrating them into custom visual.

Change how visuals interact in a report - Power BI | Microsoft Docs

You may need to 'overwrite' basic filter interfaces and add some condition parameters or options to control its status if 'custom visual' provides the customizable of these interfaces. (they should more simple process on interaction options)

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
dm-p
Super User
Super User

Hi @Balogh1Bence,

It's hard to determine the exact nature of your issue without any code or data to confirm behaviour, but visuals only get the data provided to them by Power BI based on what you have specified in the capabilities, as well as any filter context that may be applied.

So (if I've understood this properly), if you're asking the filter manager to filter your own visual, Power BI will only provide this filtered data back to your data view - you should be able to confirm this by using Performance Analyzer to observe the query your visual is running and checking the results in a tool like DAX Studio. This will likely confirm the reduced dataset you're seeing.

If you are looking to have all data available in your visual to work with, then you will likely need to avoid filtering your own so that Power BI does not reduce it down. I would probably approach this by tracking which items were being filtered by my visual in its view model (e.g. with a boolean property or similar) so that I could determine whether to show/hide or dim this data (or whatever you are trying to achieve) so that it's still available to work with for subsequent operations.

If this doesn't answer your question, please provide more information on what you are trying to do, with any supporting code (including capabilities so that we can understand the data view mapping) and I might be able to provide a more targeted answer.

Regards,

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


My course: Introduction to Developing Power BI Visuals


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




hiding and showing values based on the filters does not realy work, because the value of the totals will be incorrect. I realy hoped there is an API or some kind of variable, method or request I could use to access the unfiltered values. Its a matrix and i need all the headers for creating the filters.

The only way to do this currently if you're using a matrix data view mapping,  would be to enable supportsHighlight in your capabilities and use the selection manager rather than the filter API. Power BI will provide any results back as a corresponding highlights array and you can compare these to the original values and update your visual accordingly.

If this isn't sufficient, then it's probably best speaking to the team directly for advice - pbicvsupport@microsoft.com





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


My course: Introduction to Developing Power BI Visuals


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




KoBe321
Frequent Visitor

Is it possible to get somehow the values of the filters in the filter pane? I think Balogh1Bence could build the custom filter that way.

I'm typing this out on a mobile so hopefully reads OK (the text area is really small!)

It's certainly an interesting proposal. I believe that if you're using the filter API, you'll get the filter request your visual has made, but not necessarily what's in the filter pane as other contexts may apply (e.g. report, page or other visuals). There's currently no specific API for the filter pane content.

Note that it's possible for Power BI to determine whether your visual's filter is even needed for other visuals on the same page (for instance if you supply dates or ranges that aren't in any filter context in any other visual) - in these cases Power BI typically won't even filter as there's no computation required once it's figured things out. If there are other slicers or filter contexts affecting your visual's dataset there is no way to find this out currently, as visuals are isolated from the main window in addition to other visuals. The one exception to this is if your visual is using sync slicer capabilities and its tied to another instance of the same visual in another page. In these cases, only the jsonFilter is shared and no actual data, except for the data view Power BI computes and passes into the visual as normal.

I found this put the hard way after trying to develop a very complex slicer for a client - the developer visual host is (understandably) concerned with passing in the the bare minimum amount of data your visual should be able to see, which is basically what Power BI decides to give it based on the visual's capabilities.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


My course: Introduction to Developing Power BI Visuals


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




KoBe321
Frequent Visitor

Thank you for the answer! 

Unfortunately these solutions look quite complicated ... 😞

I think what Balogh1Bence wants is just to simply create a filter in the custom visual, which behaves like the filter in the filter pane.

In other words, it lists the values of a Field (which could be e.g. the columns of a table visual), then we can check/uncheck those values (hiding some columns this way).

Thank you, I will try this

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.