<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Power BI JS not applying Visual filters correctly in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-JS-not-applying-Visual-filters-correctly/m-p/1072562#M23481</link>
    <description>&lt;P&gt;Apologies &lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/131271"&gt;@alexmcarreira&lt;/a&gt; for the delay in responding, it has been a crazy few days.&lt;BR /&gt;&lt;BR /&gt;I was going to try and replicate this in a solution - as I had never tested JavaScript filters against a hierarchy before.&lt;BR /&gt;(I am yet to get around to this).&lt;BR /&gt;&lt;BR /&gt;One thing I did notice... was the use of '&lt;STRONG&gt;ALL&lt;/STRONG&gt;' inside some of the basic filters.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
	"$schema": "http://powerbi.com/product/schema#basic",
	"target": {
		"table": "Sales",
		"measure": "Total Sales (py)"
	},
	"filterType": 1,
	"displaySettings": {
		"isHiddenInViewMode": false
	},
	"operator": "All",
	"values": [],
	"requireSingleSelection": false
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;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...&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
	"$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
}&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 05 May 2020 10:35:03 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-05-05T10:35:03Z</dc:date>
    <item>
      <title>Power BI JS not applying Visual filters correctly</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-JS-not-applying-Visual-filters-correctly/m-p/1055896#M23383</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Category.png" style="width: 192px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/262215iF25D02438499AE56/image-size/large?v=v2&amp;amp;px=999" role="button" title="Category.png" alt="Category.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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)"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This was working last week.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've checked the open issues on Power BI Support and, currently, there is none with this issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As something changed on the API?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2020 09:16:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-JS-not-applying-Visual-filters-correctly/m-p/1055896#M23383</guid>
      <dc:creator>alexmcarreira</dc:creator>
      <dc:date>2020-04-29T09:16:12Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI JS not applying Visual filters correctly</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-JS-not-applying-Visual-filters-correctly/m-p/1057121#M23390</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/131271"&gt;@alexmcarreira&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I am not aware of any recent changes to the filter structures (doesn't mean it hasn't happend) &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;Are you able to share the filter object/code-structure that you are applying to your report?&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Matt&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2020 16:40:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-JS-not-applying-Visual-filters-correctly/m-p/1057121#M23390</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-04-29T16:40:42Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI JS not applying Visual filters correctly</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-JS-not-applying-Visual-filters-correctly/m-p/1058872#M23408</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the filter structure that I'm applying to the visual in question.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[
	{
		"$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
	}
]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Alexandre Carreira&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Apr 2020 09:43:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-JS-not-applying-Visual-filters-correctly/m-p/1058872#M23408</guid>
      <dc:creator>alexmcarreira</dc:creator>
      <dc:date>2020-04-30T09:43:50Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI JS not applying Visual filters correctly</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-JS-not-applying-Visual-filters-correctly/m-p/1072531#M23480</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have any news on this issue?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2020 10:14:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-JS-not-applying-Visual-filters-correctly/m-p/1072531#M23480</guid>
      <dc:creator>alexmcarreira</dc:creator>
      <dc:date>2020-05-05T10:14:15Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI JS not applying Visual filters correctly</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-JS-not-applying-Visual-filters-correctly/m-p/1072562#M23481</link>
      <description>&lt;P&gt;Apologies &lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/131271"&gt;@alexmcarreira&lt;/a&gt; for the delay in responding, it has been a crazy few days.&lt;BR /&gt;&lt;BR /&gt;I was going to try and replicate this in a solution - as I had never tested JavaScript filters against a hierarchy before.&lt;BR /&gt;(I am yet to get around to this).&lt;BR /&gt;&lt;BR /&gt;One thing I did notice... was the use of '&lt;STRONG&gt;ALL&lt;/STRONG&gt;' inside some of the basic filters.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
	"$schema": "http://powerbi.com/product/schema#basic",
	"target": {
		"table": "Sales",
		"measure": "Total Sales (py)"
	},
	"filterType": 1,
	"displaySettings": {
		"isHiddenInViewMode": false
	},
	"operator": "All",
	"values": [],
	"requireSingleSelection": false
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;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...&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
	"$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
}&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2020 10:35:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-JS-not-applying-Visual-filters-correctly/m-p/1072562#M23481</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-05T10:35:03Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI JS not applying Visual filters correctly</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-JS-not-applying-Visual-filters-correctly/m-p/2062012#M31598</link>
      <description>&lt;P&gt;Hello Matt,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any updates regarding this issue? Have you had the chance to test this with the hierarchy?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rúben&lt;/P&gt;</description>
      <pubDate>Tue, 07 Sep 2021 14:15:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-JS-not-applying-Visual-filters-correctly/m-p/2062012#M31598</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-09-07T14:15:13Z</dc:date>
    </item>
  </channel>
</rss>

