Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hello,
I'm currently facing an issue where the visual is loading with the filter applied. The label is correctly identifying the filter applied but the checkbox is not checked. (image below)
When I'm trying to get the filters using javascript I'm getting an error with the following error "Basic filter requires an operator (In | Not)"
This was working last week.
I've checked the open issues on Power BI Support and, currently, there is none with this issue.
As something changed on the API?
Thank you.
Hi @alexmcarreira
I am not aware of any recent changes to the filter structures (doesn't mean it hasn't happend) 🙂
Are you able to share the filter object/code-structure that you are applying to your report?
Cheers,
Matt
Hello,
This is the filter structure that I'm applying to the visual in question.
[
{
"$schema": "http://powerbi.com/product/schema#basic",
"target": {
"table": "Product",
"hierarchy": "Product Hierarchy",
"hierarchyLevel": "Category"
},
"filterType": 1,
"displaySettings": {
"isHiddenInViewMode": false
},
"operator": "In",
"values": [
"Mix"
],
"requireSingleSelection": false
},
{
"$schema": "http://powerbi.com/product/schema#basic",
"target": {
"table": "Product",
"hierarchy": "Product Hierarchy",
"hierarchyLevel": "Segment"
},
"filterType": 1,
"displaySettings": {
"isHiddenInViewMode": false
},
"operator": "All",
"values": [],
"requireSingleSelection": false
},
{
"$schema": "http://powerbi.com/product/schema#basic",
"target": {
"table": "Product",
"hierarchy": "Product Hierarchy",
"hierarchyLevel": "Product"
},
"filterType": 1,
"displaySettings": {
"isHiddenInViewMode": false
},
"operator": "All",
"values": [],
"requireSingleSelection": false
},
{
"$schema": "http://powerbi.com/product/schema#basic",
"target": {
"table": "Sales",
"measure": "Total Sales"
},
"filterType": 1,
"displaySettings": {
"isHiddenInViewMode": false
},
"operator": "All",
"values": [],
"requireSingleSelection": false
},
{
"$schema": "http://powerbi.com/product/schema#basic",
"target": {
"table": "Sales",
"measure": "Total Sales (py)"
},
"filterType": 1,
"displaySettings": {
"isHiddenInViewMode": false
},
"operator": "All",
"values": [],
"requireSingleSelection": false
},
{
"$schema": "http://powerbi.com/product/schema#basic",
"target": {
"table": "Sales",
"measure": "% Sales Growth vs PY"
},
"filterType": 1,
"displaySettings": {
"isHiddenInViewMode": false
},
"operator": "All",
"values": [],
"requireSingleSelection": false
}
]
Thanks.
Alexandre Carreira
Hello,
Do you have any news on this issue?
Thanks
Apologies @alexmcarreira for the delay in responding, it has been a crazy few days.
I was going to try and replicate this in a solution - as I had never tested JavaScript filters against a hierarchy before.
(I am yet to get around to this).
One thing I did notice... was the use of 'ALL' inside some of the basic filters.
{
"$schema": "http://powerbi.com/product/schema#basic",
"target": {
"table": "Sales",
"measure": "Total Sales (py)"
},
"filterType": 1,
"displaySettings": {
"isHiddenInViewMode": false
},
"operator": "All",
"values": [],
"requireSingleSelection": false
}
My understanding is that this is not a valid operator for this filter type... and is probably the reason for the "Basic filter requires an operator (In | Not)" error.
If you want to default to having ALL values selected, then you should either not supply the filter definition at all... OR select "IN" with an empty array. The last time I used this, it behaved in the same was as having all options selected.
I will try and get some time to look at testing this with the hierarchy, just in case that is the cause of your original issue...
{
"$schema": "http://powerbi.com/product/schema#basic",
"target": {
"table": "Product",
"hierarchy": "Product Hierarchy",
"hierarchyLevel": "Category"
},
"filterType": 1,
"displaySettings": {
"isHiddenInViewMode": false
},
"operator": "In",
"values": [
"Mix"
],
"requireSingleSelection": false
}
Hello Matt,
Any updates regarding this issue? Have you had the chance to test this with the hierarchy?
Regards,
Rúben
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
6 | |
1 | |
1 | |
1 | |
1 |