<?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: multi selection with AND operator in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/multi-selection-with-AND-operator/m-p/781012#M20577</link>
    <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/397"&gt;@dm-p&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm already solve this, the key is not how the manager to select but how the builder to create selectionId, right as your comment.&lt;/P&gt;&lt;P&gt;the hard way with matrix are how to create selectionId with row parents and columns parent.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this is my function with recursive children&lt;/P&gt;&lt;PRE&gt;if (x.values) {
                let keys = Object.keys(x.values);
                keys.forEach(k =&amp;gt; {

                    let keyNum = Number(k);
                    let builder = host.createSelectionIdBuilder();

                    copyParents.forEach(p =&amp;gt; {
                        builder.withMatrixNode(p, matrix.rows.levels);
                    });
                    
                    let colRef = columnsRef[keyNum];
                    colRef.nodes.forEach(p =&amp;gt; {
                        builder.withMatrixNode(p, matrix.columns.levels);
                    });


                    let _td: DataListSelection = {
                        value: x.values[k],
                        selectionId: builder.createSelectionId(),
                    }
                    listSelectionPerRow.push(_td);

                });
            }&lt;/PRE&gt;</description>
    <pubDate>Mon, 02 Sep 2019 03:50:17 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-09-02T03:50:17Z</dc:date>
    <item>
      <title>multi selection with AND operator</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/multi-selection-with-AND-operator/m-p/780671#M20574</link>
      <description>&lt;P&gt;hi community&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have 2 selectionId,&lt;/P&gt;&lt;P&gt;1. select the city with value "Malang"&lt;/P&gt;&lt;P&gt;2. select the month with value "3"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this is the my code&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;                let list : ISelectionId[] = [];
                list.push(this.model.dataPoints[0].selectionId); // city == Malang
                list.push(this.model.dataPoints[index].selectionId); // month == 3

                // console.log('sebelum', this.model.dataPoints[index].selectionId);
                // let includes = this.model.dataPoints[index].selectionId.includes(this.model.dataPoints[0].selectionId);
                // console.log('includes', includes);
                // console.log('hasil includes', this.model.dataPoints[index].selectionId);

                // ISQExpr.and

                selectionManager.select(list, true).then((ids: ISelectionId[]) =&amp;gt; {
                    console.log('hasilnya', ids);
                });&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but the result are "select all city with month == 3 or city == Malang"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how to make multiple selectionId with and operator?&lt;/P&gt;&lt;P&gt;the expected result only show month == 3 &amp;amp;&amp;amp; city == Malang&lt;/P&gt;</description>
      <pubDate>Sat, 31 Aug 2019 16:39:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/multi-selection-with-AND-operator/m-p/780671#M20574</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-31T16:39:27Z</dc:date>
    </item>
    <item>
      <title>Re: multi selection with AND operator</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/multi-selection-with-AND-operator/m-p/780944#M20576</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I can't tell from your snippet how your &lt;FONT face="courier new,courier"&gt;selectionIds&lt;/FONT&gt; are generated, I believe you'll need to apply both columns to your &lt;FONT face="courier new,courier"&gt;ISelectionIdBuilder&lt;/FONT&gt; in order to generate one that intersects both categoricial values.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not sure if you've previously &lt;A href="https://github.com/microsoft/PowerBI-visuals/blob/master/Visual/Selection.md" target="_self"&gt;referred to this page&lt;/A&gt;, but it covers how you might chain the &lt;FONT face="courier new,courier"&gt;createSelectionId&lt;/FONT&gt; method with multiple values (for instance, &lt;FONT face="courier new,courier"&gt;.withCategory()&lt;/FONT&gt; and &lt;FONT face="courier new,courier"&gt;.withSeries()&lt;/FONT&gt;).&lt;/P&gt;&lt;P&gt;If you're not having much luck with this, perhaps you can share your &lt;FONT face="courier new,courier"&gt;capabilities.json&lt;/FONT&gt; and your view model mapping code? We can have a look and see if we can get a little further with it for you.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Mon, 02 Sep 2019 01:58:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/multi-selection-with-AND-operator/m-p/780944#M20576</guid>
      <dc:creator>dm-p</dc:creator>
      <dc:date>2019-09-02T01:58:03Z</dc:date>
    </item>
    <item>
      <title>Re: multi selection with AND operator</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/multi-selection-with-AND-operator/m-p/781012#M20577</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/397"&gt;@dm-p&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm already solve this, the key is not how the manager to select but how the builder to create selectionId, right as your comment.&lt;/P&gt;&lt;P&gt;the hard way with matrix are how to create selectionId with row parents and columns parent.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this is my function with recursive children&lt;/P&gt;&lt;PRE&gt;if (x.values) {
                let keys = Object.keys(x.values);
                keys.forEach(k =&amp;gt; {

                    let keyNum = Number(k);
                    let builder = host.createSelectionIdBuilder();

                    copyParents.forEach(p =&amp;gt; {
                        builder.withMatrixNode(p, matrix.rows.levels);
                    });
                    
                    let colRef = columnsRef[keyNum];
                    colRef.nodes.forEach(p =&amp;gt; {
                        builder.withMatrixNode(p, matrix.columns.levels);
                    });


                    let _td: DataListSelection = {
                        value: x.values[k],
                        selectionId: builder.createSelectionId(),
                    }
                    listSelectionPerRow.push(_td);

                });
            }&lt;/PRE&gt;</description>
      <pubDate>Mon, 02 Sep 2019 03:50:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/multi-selection-with-AND-operator/m-p/781012#M20577</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-02T03:50:17Z</dc:date>
    </item>
  </channel>
</rss>

