<?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: in selector json what is the 't' attribute in Custom Visuals Development Discussion</title>
    <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/in-selector-json-what-is-the-t-attribute/m-p/543816#M1502</link>
    <description>&lt;P&gt;Trying to build the whole selector object, but don't know what the classes are and still get the same error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;                    let cat = this.dataView.categorical.categories[index-1];

                    cat.values.forEach((val:any, valIndex:number) =&amp;gt; {

                        if (!hash[val+'']) {
                            hash[val+''] = true;
                        
                            let optV:HTMLOptionElement = document.createElement("option");
                            optV.text = val;
                            optV.value = val;
            
                            this.dropdownByValues.options.add(optV);

                            // this.selectionIds[val+''] = this.host.createSelectionIdBuilder()
                            //     .withCategory(cat, valIndex)
                            //     .createSelectionId();

                            var expr:any = cat.source.expr;
                            var typ:any = cat.source.type;
                            var typVal = (typ.primitiveType == 1 ? "\"" + val + "\"" : val);
                            var dm:string = expr.source.entity + "." + expr.ref;

                            var obj:any = {
                                expr: {
                                    comparison: 0,
                                    kind: 13,
                                    left: { kind: 2, ref: expr.ref, source: expr.source },
                                    right: { kind:17, type: typ, value: typVal }
                                },
                                key: "{\"comp\":{\"k\":0,\"l\":{\"col\":{\"s\":{\"e\":\"" + expr.source.entity + "\"},\"r\":\"" + expr.ref + "\"}},\"r\":{\"const\":{\"t\":" + typ.primitiveType + ",\"v\":" + typVal + "}}}}",
                                kind: 1  
                            };

                            this.selectionIds[val+''] = {
                                highlight: false,
                                key: "{\"selector\":\"{\\\"data\\\":[\\\"{\\\\\\\"comp\\\\\\\":{\\\\\\\"k\\\\\\\":0,\\\\\\\"l\\\\\\\":{\\\\\\\"col\\\\\\\":{\\\\\\\"s\\\\\\\":{\\\\\\\"e\\\\\\\":\\\\\\\"" + expr.source.entity + "\\\\\\\"},\\\\\\\"r\\\\\\\":\\\\\\\"" + expr.ref + "\\\\\\\"}},\\\\\\\"r\\\\\\\":{\\\\\\\"const\\\\\\\":{\\\\\\\"t\\\\\\\":" + typ.primitiveType + ",\\\\\\\"v\\\\\\\":" + typVal + "}}}}\\\"]}\",\"highlight\":false}",
                                keyWithoutHighlight: "{\"selector\":\"{\\\"data\\\":[\\\"{\\\\\\\"comp\\\\\\\":{\\\\\\\"k\\\\\\\":0,\\\\\\\"l\\\\\\\":{\\\\\\\"col\\\\\\\":{\\\\\\\"s\\\\\\\":{\\\\\\\"e\\\\\\\":\\\\\\\"" + expr.source.entity + "\\\\\\\"},\\\\\\\"r\\\\\\\":\\\\\\\"" + expr.ref + "\\\\\\\"}},\\\\\\\"r\\\\\\\":{\\\\\\\"const\\\\\\\":{\\\\\\\"t\\\\\\\":" + typ.primitiveType + ",\\\\\\\"v\\\\\\\":" + typVal + "}}}}\\\"]}\"}",
                                selector: {
                                    data: [{
                                        obj
                                    }]
                                },
                                selectorsByColumn: {
                                    dataMap: {
                                    }
                                }
                            };

                            this.selectionIds[val+''].selectorsByColumn.dataMap[dm] = obj;
                        }
                    });&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 16 Oct 2018 22:02:48 GMT</pubDate>
    <dc:creator>rdegr</dc:creator>
    <dc:date>2018-10-16T22:02:48Z</dc:date>
    <item>
      <title>in selector json what is the 't' attribute</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/in-selector-json-what-is-the-t-attribute/m-p/538780#M1466</link>
      <description>&lt;P&gt;"{"selector":"{\"data\":[\"{\\\"comp\\\":{\\\"k\\\":0,\\\"l\\\":{\\\"col\\\":{\\\"s\\\":{\\\"e\\\":\\\"qtEmergencyRecords\\\"},\\\"r\\\":\\\"Year\\\"}},\\\"r\\\":{\\\"const\\\":{&lt;FONT color="#FF0000"&gt;\\\"t\\\":4&lt;/FONT&gt;,\\\"v\\\":2017}}}}\"]}","highlight":false}"&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;"{"selector":"{\"data\":[\"{\\\"comp\\\":{\\\"k\\\":0,\\\"l\\\":{\\\"col\\\":{\\\"s\\\":{\\\"e\\\":\\\"qtFacility\\\"},\\\"r\\\":\\\"Facility County\\\"}},\\\"r\\\":{\\\"const\\\":{&lt;FONT color="#FF0000"&gt;\\\"t\\\":1&lt;/FONT&gt;,\\\"v\\\":\\\"Baker\\\"}}}}\"]}","highlight":false}"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Seems like some sort of type code but doesn't match anything I see in metadata.&amp;nbsp; Please advise.&amp;nbsp; I am trying to build a filter that lets me select table/column, then value, but the generated selectors build filters across all the columns I've added to the control. so I'd like to build simple filters as above manually.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Oct 2018 14:47:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/in-selector-json-what-is-the-t-attribute/m-p/538780#M1466</guid>
      <dc:creator>rdegr</dc:creator>
      <dc:date>2018-10-10T14:47:07Z</dc:date>
    </item>
    <item>
      <title>Re: in selector json what is the 't' attribute</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/in-selector-json-what-is-the-t-attribute/m-p/539486#M1468</link>
      <description>&lt;P&gt;What is expected behavior for filtering?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Ignat Vilesov,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Software Engineer&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Microsoft Power BI Custom Visuals&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&lt;A href="mailto:pbicvsupport@microsoft.com" target="_blank"&gt;pbicvsupport@microsoft.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Oct 2018 07:37:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/in-selector-json-what-is-the-t-attribute/m-p/539486#M1468</guid>
      <dc:creator>v-viig</dc:creator>
      <dc:date>2018-10-11T07:37:31Z</dc:date>
    </item>
    <item>
      <title>Re: in selector json what is the 't' attribute</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/in-selector-json-what-is-the-t-attribute/m-p/543734#M1500</link>
      <description>&lt;P&gt;I want to first select a column from a dropdown list of the columns added to the control in edit mode, then select values from that column- I have that much working- then filter on the selected values for the selected column only.&amp;nbsp; The problem is that once I have multiple columns and switch between them the code generates filters that filter across multiple columns so I want to build my own filter string or otherwise only filter the selected column.&amp;nbsp; Here is my selection method&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;        public setSelectedByValues() {
            let arr:any[] = [];

            for (let i = 0; i &amp;lt; this.dropdownByValues.selectedOptions.length; i++) {
                arr.push(this.selectionIds[this.dropdownByValues.selectedOptions[i].value+'']);
            }

            this.selectionManager.clear().then(()=&amp;gt; {
                this.selectionManager.select(arr, false).then((ids: ISelectionId[])=&amp;gt; {
                    debugger;
                    this.selectionManager.applySelectionFilter();
                });
            });
                
        }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;and&amp;nbsp;this.selectionIds populated as follows:&lt;/P&gt;&lt;PRE&gt;                    let cat = this.dataView.categorical.categories[index-1];

                    cat.values.forEach((val:any, valIndex:number) =&amp;gt; {

                        if (!hash[val+'']) {
                            hash[val+''] = true;
                        
                            let optV:HTMLOptionElement = document.createElement("option");
                            optV.text = val;
                            optV.value = val;
            
                            this.dropdownByValues.options.add(optV);

                            this.selectionIds[val+''] = this.host.createSelectionIdBuilder()
                                .withCategory(cat, valIndex)
                                .createSelectionId();
                        }
                    });&lt;/PRE&gt;&lt;P&gt;I think the real issue may be in this code. Here is an example of a selector where all I want is to filter on year but I also get facility.&lt;/P&gt;&lt;PRE&gt;{"selector":"{\"data\":[\"{\\\"and\\\":{\\\"l\\\":{\\\"comp\\\":{\\\"k\\\":0,\\\"l\\\":{\\\"col\\\":{\\\"s\\\":{\\\"e\\\":\\\"qtEmergencyRecords\\\"},\\\"r\\\":\\\"Year\\\"}},\\\"r\\\":{\\\"const\\\":{\\\"t\\\":4,\\\"v\\\":2017}}}},\\\"r\\\":{\\\"comp\\\":{\\\"k\\\":0,\\\"l\\\":{\\\"col\\\":{\\\"s\\\":{\\\"e\\\":\\\"qtFacility\\\"},\\\"r\\\":\\\"Facility County\\\"}},\\\"r\\\":{\\\"const\\\":{\\\"t\\\":1,\\\"v\\\":\\\"Alachua\\\"}}}}}}\"]}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Oct 2018 17:03:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/in-selector-json-what-is-the-t-attribute/m-p/543734#M1500</guid>
      <dc:creator>rdegr</dc:creator>
      <dc:date>2018-10-16T17:03:14Z</dc:date>
    </item>
    <item>
      <title>Re: in selector json what is the 't' attribute</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/in-selector-json-what-is-the-t-attribute/m-p/543791#M1501</link>
      <description>&lt;P&gt;When I manually build "selector" strings identical to the ones I get if I only have a single column added to the control, then I get&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Uncaught TypeError: e.hasIdentity is not a function&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;at&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this.selectionManager.select(arr, false)&lt;/P&gt;</description>
      <pubDate>Tue, 16 Oct 2018 18:10:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/in-selector-json-what-is-the-t-attribute/m-p/543791#M1501</guid>
      <dc:creator>rdegr</dc:creator>
      <dc:date>2018-10-16T18:10:26Z</dc:date>
    </item>
    <item>
      <title>Re: in selector json what is the 't' attribute</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/in-selector-json-what-is-the-t-attribute/m-p/543816#M1502</link>
      <description>&lt;P&gt;Trying to build the whole selector object, but don't know what the classes are and still get the same error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;                    let cat = this.dataView.categorical.categories[index-1];

                    cat.values.forEach((val:any, valIndex:number) =&amp;gt; {

                        if (!hash[val+'']) {
                            hash[val+''] = true;
                        
                            let optV:HTMLOptionElement = document.createElement("option");
                            optV.text = val;
                            optV.value = val;
            
                            this.dropdownByValues.options.add(optV);

                            // this.selectionIds[val+''] = this.host.createSelectionIdBuilder()
                            //     .withCategory(cat, valIndex)
                            //     .createSelectionId();

                            var expr:any = cat.source.expr;
                            var typ:any = cat.source.type;
                            var typVal = (typ.primitiveType == 1 ? "\"" + val + "\"" : val);
                            var dm:string = expr.source.entity + "." + expr.ref;

                            var obj:any = {
                                expr: {
                                    comparison: 0,
                                    kind: 13,
                                    left: { kind: 2, ref: expr.ref, source: expr.source },
                                    right: { kind:17, type: typ, value: typVal }
                                },
                                key: "{\"comp\":{\"k\":0,\"l\":{\"col\":{\"s\":{\"e\":\"" + expr.source.entity + "\"},\"r\":\"" + expr.ref + "\"}},\"r\":{\"const\":{\"t\":" + typ.primitiveType + ",\"v\":" + typVal + "}}}}",
                                kind: 1  
                            };

                            this.selectionIds[val+''] = {
                                highlight: false,
                                key: "{\"selector\":\"{\\\"data\\\":[\\\"{\\\\\\\"comp\\\\\\\":{\\\\\\\"k\\\\\\\":0,\\\\\\\"l\\\\\\\":{\\\\\\\"col\\\\\\\":{\\\\\\\"s\\\\\\\":{\\\\\\\"e\\\\\\\":\\\\\\\"" + expr.source.entity + "\\\\\\\"},\\\\\\\"r\\\\\\\":\\\\\\\"" + expr.ref + "\\\\\\\"}},\\\\\\\"r\\\\\\\":{\\\\\\\"const\\\\\\\":{\\\\\\\"t\\\\\\\":" + typ.primitiveType + ",\\\\\\\"v\\\\\\\":" + typVal + "}}}}\\\"]}\",\"highlight\":false}",
                                keyWithoutHighlight: "{\"selector\":\"{\\\"data\\\":[\\\"{\\\\\\\"comp\\\\\\\":{\\\\\\\"k\\\\\\\":0,\\\\\\\"l\\\\\\\":{\\\\\\\"col\\\\\\\":{\\\\\\\"s\\\\\\\":{\\\\\\\"e\\\\\\\":\\\\\\\"" + expr.source.entity + "\\\\\\\"},\\\\\\\"r\\\\\\\":\\\\\\\"" + expr.ref + "\\\\\\\"}},\\\\\\\"r\\\\\\\":{\\\\\\\"const\\\\\\\":{\\\\\\\"t\\\\\\\":" + typ.primitiveType + ",\\\\\\\"v\\\\\\\":" + typVal + "}}}}\\\"]}\"}",
                                selector: {
                                    data: [{
                                        obj
                                    }]
                                },
                                selectorsByColumn: {
                                    dataMap: {
                                    }
                                }
                            };

                            this.selectionIds[val+''].selectorsByColumn.dataMap[dm] = obj;
                        }
                    });&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Oct 2018 22:02:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/in-selector-json-what-is-the-t-attribute/m-p/543816#M1502</guid>
      <dc:creator>rdegr</dc:creator>
      <dc:date>2018-10-16T22:02:48Z</dc:date>
    </item>
    <item>
      <title>Re: in selector json what is the 't' attribute</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/in-selector-json-what-is-the-t-attribute/m-p/543926#M1503</link>
      <description>&lt;P&gt;OK, after much tracing through the code I am beginning to make some progress. The missing piece of my object construction was encoded values.&amp;nbsp; Unfortunately, what I find in&amp;nbsp;&lt;A href="https://github.com/deldersveld/PowerBI-visuals/blob/master/src/Clients/VisualsData/semanticQuery/primitiveValueEncoding.ts" target="_blank"&gt;https://github.com/deldersveld/PowerBI-visuals/blob/master/src/Clients/VisualsData/semanticQuery/primitiveValueEncoding.ts&lt;/A&gt; suggests I need to distinguish between "decimal" and "double" numeric types and nothing in the category source type makes that distinction.&amp;nbsp; I could very much use a mapping for the category.source.type.underlyingType values but I have not found it yet.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;                            if (cat.source.type.integer) {
                                obj.expr.right.valueEncoded = val + "L";
                            }
                            else if (cat.source.type.numeric) {
                                obj.expr.right.valueEncoded = val + "D"; // TODO decimal v double
                            }
                            else if (cat.source.type.text)
                            {
                                obj.expr.right.valueEncoded = "'" + val.replace("'", "''") + "'";
                            }
                            else
                            {
                                obj.expr.right.valueEncoded = typVal;
                            }&lt;/PRE&gt;&lt;P&gt;Complete construction that now gives desired behavior for one integer and one text column. Desired behavior being to ignore any other column but the selected column.&lt;/P&gt;&lt;PRE&gt;                    let cat = this.dataView.categorical.categories[index-1];

                    cat.values.forEach((val:any, valIndex:number) =&amp;gt; {

                        if (!hash[val+'']) {
                            hash[val+''] = true;
                        
                            let optV:HTMLOptionElement = document.createElement("option");
                            optV.text = val;
                            optV.value = val;
            
                            this.dropdownByValues.options.add(optV);

                            // this.selectionIds[val+''] = this.host.createSelectionIdBuilder()
                            //     .withCategory(cat, valIndex)
                            //     .createSelectionId();

                            let expr:any = cat.source.expr;
                            let typ:any = cat.source.type;
                            let typVal = (typ.primitiveType == 1 ? "\"" + val + "\"" : val);
                            let dm:string = expr.source.entity + "." + expr.ref;

                            expr.source.accept = function(e,t) {
                                return e.visitEntity(expr.source, t);
                            }

                            

                            let obj:any = {
                                expr: {
                                    comparison: 0,
                                    kind: 13,
                                    left: { kind: 2, ref: expr.ref, source: expr.source, accept(e,t) { return e.visitColumnRef(obj.expr.left, t); } },
                                    right: { kind:17, type: typ, value: typVal, accept(e,t) { return e.visitConstant(obj.expr.right, t); } },
                                    accept(e,t) {
                                        return e.visitAnd(obj.expr, t);
                                    }
                                },
                                key: "{\"comp\":{\"k\":0,\"l\":{\"col\":{\"s\":{\"e\":\"" + expr.source.entity + "\"},\"r\":\"" + expr.ref + "\"}},\"r\":{\"const\":{\"t\":" + typ.primitiveType + ",\"v\":" + typVal + "}}}}",
                                kind: 1
                            };

                            if (cat.source.type.integer) {
                                obj.expr.right.valueEncoded = val + "L";
                            }
                            else if (cat.source.type.numeric) {
                                obj.expr.right.valueEncoded = val + "D"; // TODO decimal v double
                            }
                            else if (cat.source.type.text)
                            {
                                obj.expr.right.valueEncoded = "'" + val.replace("'", "''") + "'";
                            }
                            else
                            {
                                obj.expr.right.valueEncoded = typVal;
                            }

                            let selectorObj = {
                                highlight: false,
                                key: "{\"selector\":\"{\\\"data\\\":[\\\"{\\\\\\\"comp\\\\\\\":{\\\\\\\"k\\\\\\\":0,\\\\\\\"l\\\\\\\":{\\\\\\\"col\\\\\\\":{\\\\\\\"s\\\\\\\":{\\\\\\\"e\\\\\\\":\\\\\\\"" + expr.source.entity + "\\\\\\\"},\\\\\\\"r\\\\\\\":\\\\\\\"" + expr.ref + "\\\\\\\"}},\\\\\\\"r\\\\\\\":{\\\\\\\"const\\\\\\\":{\\\\\\\"t\\\\\\\":" + typ.primitiveType + ",\\\\\\\"v\\\\\\\":" + typVal + "}}}}\\\"]}\",\"highlight\":false}",
                                keyWithoutHighlight: "{\"selector\":\"{\\\"data\\\":[\\\"{\\\\\\\"comp\\\\\\\":{\\\\\\\"k\\\\\\\":0,\\\\\\\"l\\\\\\\":{\\\\\\\"col\\\\\\\":{\\\\\\\"s\\\\\\\":{\\\\\\\"e\\\\\\\":\\\\\\\"" + expr.source.entity + "\\\\\\\"},\\\\\\\"r\\\\\\\":\\\\\\\"" + expr.ref + "\\\\\\\"}},\\\\\\\"r\\\\\\\":{\\\\\\\"const\\\\\\\":{\\\\\\\"t\\\\\\\":" + typ.primitiveType + ",\\\\\\\"v\\\\\\\":" + typVal + "}}}}\\\"]}\"}",
                                selector: {
                                    data: []
                                },
                                selectorsByColumn: {
                                    dataMap: {
                                    }
                                },
                                getKey() {
                                    return selectorObj.key;
                                },
                                getKeyWithoutHighlight() {
                                    return selectorObj.keyWithoutHighlight;
                                },
                                getSelector() {
                                    return selectorObj.selector;
                                },
                                getSelectorsByColumn() {
                                    return selectorObj.selectorsByColumn;
                                },
                                hasIdentity() {
                                    return true;
                                }
                            };

                            selectorObj.selectorsByColumn.dataMap[dm] = obj;
                            selectorObj.selector.data[0] = obj;

                            this.selectionIds[val+''] = selectorObj;
                        }
                    });&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 Oct 2018 21:56:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/in-selector-json-what-is-the-t-attribute/m-p/543926#M1503</guid>
      <dc:creator>rdegr</dc:creator>
      <dc:date>2018-10-16T21:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: in selector json what is the 't' attribute</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/in-selector-json-what-is-the-t-attribute/m-p/544162#M1505</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/85811"&gt;@rdegr&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had a similar request andwas able to solve it in the following was:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. I create an array of custom identities, in this case it&amp;nbsp;uses the &lt;FONT face="courier new,courier"&gt;category&lt;/FONT&gt; as text, but that can be changed to &lt;FONT face="courier new,courier"&gt;SQExprBuilder.number&lt;/FONT&gt; if needed.&lt;/P&gt;&lt;PRE&gt;let categoryIdentities = categories.map((category) =&amp;gt; {
    let sqlExpr = powerbi["data"].SQExprBuilder.equal(dataView.metadata.columns[0].expr, powerbi["data"].SQExprBuilder.text(category));
    return powerbi["data"].createDataViewScopeIdentity(sqlExpr);
});&lt;BR /&gt;&lt;BR /&gt;# ref: &lt;FONT&gt;https://github.com/liprec/powerbi-boxWhiskerChart/blob/89179879a7209b030245fd05c317eee2034db394/src/boxWhiskerChart.ts#L260&lt;/FONT&gt;&lt;/PRE&gt;&lt;P&gt;2. When I loop thru the individual catagories (=&lt;FONT face="courier new,courier"&gt;i&lt;/FONT&gt; variable)I use the following code to create the correct &lt;FONT face="courier new,courier"&gt;SelectionId&lt;/FONT&gt; identifier:&lt;/P&gt;&lt;PRE&gt;let selectionId = new SelectionId({ data: [ categoryIdentities[i] ] }, false);

# ref: https://github.com/liprec/powerbi-boxWhiskerChart/blob/89179879a7209b030245fd05c317eee2034db394/src/boxWhiskerChart.ts#L282&lt;/PRE&gt;&lt;P&gt;I added links to my solution for more reference and hope this can also work for your visual.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-JP&lt;/P&gt;</description>
      <pubDate>Wed, 17 Oct 2018 06:22:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/in-selector-json-what-is-the-t-attribute/m-p/544162#M1505</guid>
      <dc:creator>jppp</dc:creator>
      <dc:date>2018-10-17T06:22:09Z</dc:date>
    </item>
    <item>
      <title>Re: in selector json what is the 't' attribute</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/in-selector-json-what-is-the-t-attribute/m-p/544688#M1512</link>
      <description>&lt;P&gt;Very cool.&amp;nbsp; I will try this out.&amp;nbsp; My way still has an issue of recordsets growing as more columns are added (something trying to cross-reference) which this may work around.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Oct 2018 13:18:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/in-selector-json-what-is-the-t-attribute/m-p/544688#M1512</guid>
      <dc:creator>rdegr</dc:creator>
      <dc:date>2018-10-17T13:18:18Z</dc:date>
    </item>
    <item>
      <title>Re: in selector json what is the 't' attribute</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/in-selector-json-what-is-the-t-attribute/m-p/544766#M1514</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Does not solve the cross-reference issue but does replace some ugly handrolled selector code of mine.&amp;nbsp; Thanks!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Oct 2018 14:29:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/in-selector-json-what-is-the-t-attribute/m-p/544766#M1514</guid>
      <dc:creator>rdegr</dc:creator>
      <dc:date>2018-10-17T14:29:14Z</dc:date>
    </item>
    <item>
      <title>Re: in selector json what is the 't' attribute</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/in-selector-json-what-is-the-t-attribute/m-p/545954#M1532</link>
      <description>&lt;P&gt;As far as I know you can add extra columns to the `&lt;SPAN&gt;sqlExpr` variable and combine them with `powerbi["data"].SQExprBuilder.and` method.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;There is no need to construct this kind of filters/selectors by&amp;nbsp;yourself as all the needed methods of `SQExprBuiler` are exposed to be used with a Custom Visual. Take a look at the repository of the old Power BI visuals:&amp;nbsp;&lt;FONT&gt;&lt;A href="https://github.com/avontd2868/PowerBI-visuals/tree/master/src/Clients/Data/semanticQuery" target="_blank"&gt;https://github.com/avontd2868/PowerBI-visuals/tree/master/src/Clients/Data/semanticQuery&lt;/A&gt; for more details.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;FONT&gt;-JP&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2018 14:37:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/in-selector-json-what-is-the-t-attribute/m-p/545954#M1532</guid>
      <dc:creator>jppp</dc:creator>
      <dc:date>2018-10-18T14:37:59Z</dc:date>
    </item>
    <item>
      <title>Re: in selector json what is the 't' attribute</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/in-selector-json-what-is-the-t-attribute/m-p/545959#M1533</link>
      <description>&lt;P&gt;I'm not trying to add extra columns, but to work around them being added when I don't want. Your SQLExprBuilder code was helpful to me, it replaced about 20 lines where I was building a selector object from scratch. Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2018 14:41:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/in-selector-json-what-is-the-t-attribute/m-p/545959#M1533</guid>
      <dc:creator>rdegr</dc:creator>
      <dc:date>2018-10-18T14:41:27Z</dc:date>
    </item>
    <item>
      <title>Re: in selector json what is the 't' attribute</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/in-selector-json-what-is-the-t-attribute/m-p/545985#M1535</link>
      <description>&lt;P&gt;I've solved my problem and will select the most helpful of these replies as (part of) the solution.&amp;nbsp; For the issue of being limited to 30K values I preloaded values for known columns.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;module DistinctValues {

    export var qtEmergencyRecords:any = {};
    
    qtEmergencyRecords["Year"] = [ 2016, 2017 ];    

    export var qtFacility:any = {};

    qtFacility["Facility County"] = [
        "Alachua",
        "Baker",
        "Bay",
        "Bradford",
        ...&lt;/PRE&gt;&lt;P&gt;then in processing a category "cat"&lt;/P&gt;&lt;PRE&gt;                    let arr = cat.values;
                    if (DistinctValues[expr.source.entity])
                    {
                        let dvs = DistinctValues[expr.source.entity];

                        if (dvs[expr.ref] &amp;amp;&amp;amp; dvs[expr.ref].length)
                        {
                            arr = dvs[expr.ref];
                        }
                    }
                    
                    arr.forEach((val:any, valIndex:number) =&amp;gt; {&lt;/PRE&gt;</description>
      <pubDate>Thu, 18 Oct 2018 15:04:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/in-selector-json-what-is-the-t-attribute/m-p/545985#M1535</guid>
      <dc:creator>rdegr</dc:creator>
      <dc:date>2018-10-18T15:04:18Z</dc:date>
    </item>
    <item>
      <title>Re: in selector json what is the 't' attribute</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/in-selector-json-what-is-the-t-attribute/m-p/545986#M1536</link>
      <description>&lt;P&gt;You should be able to construct all needed filters/selectors with the `SQExprBuilder`&amp;nbsp;as Power BI itself is using the same.&lt;/P&gt;&lt;P&gt;Or you are trying to create something that Power BI doesn't understand.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-JP&lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2018 15:04:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/in-selector-json-what-is-the-t-attribute/m-p/545986#M1536</guid>
      <dc:creator>jppp</dc:creator>
      <dc:date>2018-10-18T15:04:31Z</dc:date>
    </item>
    <item>
      <title>Re: in selector json what is the 't' attribute</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/in-selector-json-what-is-the-t-attribute/m-p/546003#M1537</link>
      <description>&lt;P&gt;My problem is it wants to cross-reference the columns I've added.&amp;nbsp; If I add a column with two distinct values, then another with 100, then I get 200 "values" for the first column, one for every combo of the two.&amp;nbsp; And&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;                            this.selectionIds[val+''] = this.host.createSelectionIdBuilder()
                                 .withCategory(cat, valIndex)
                                 .createSelectionId();&lt;/PRE&gt;&lt;P&gt;creates filters that apply to both columns.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used your example to build a selector for just the column I care about.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2018 15:10:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/in-selector-json-what-is-the-t-attribute/m-p/546003#M1537</guid>
      <dc:creator>rdegr</dc:creator>
      <dc:date>2018-10-18T15:10:00Z</dc:date>
    </item>
    <item>
      <title>Re: in selector json what is the 't' attribute</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/in-selector-json-what-is-the-t-attribute/m-p/546654#M1542</link>
      <description>&lt;P&gt;Please note&amp;nbsp;&lt;SPAN&gt;SQExprBuilder is not documented as official API. It might be removed or changed without any notification.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you need some specific API please send us details to&amp;nbsp;&lt;STRONG&gt;pbicvsupport@microsoft.com&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Otherwise, you might get unexpected breaks.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Ignat Vilesov,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Software Engineer&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Microsoft Power BI Custom Visuals&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&lt;A href="mailto:pbicvsupport@microsoft.com" target="_blank"&gt;pbicvsupport@microsoft.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Oct 2018 06:57:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/in-selector-json-what-is-the-t-attribute/m-p/546654#M1542</guid>
      <dc:creator>v-viig</dc:creator>
      <dc:date>2018-10-19T06:57:34Z</dc:date>
    </item>
    <item>
      <title>Re: in selector json what is the 't' attribute</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/in-selector-json-what-is-the-t-attribute/m-p/547115#M1546</link>
      <description>&lt;P&gt;Thank you, that is useful to know.&amp;nbsp; I'm on 1.5 currently as some samples I looked at early on didn't work with 2.x.&amp;nbsp; This is for a single app of ours, we don't plan to try to publish it publicly.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Oct 2018 13:13:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/in-selector-json-what-is-the-t-attribute/m-p/547115#M1546</guid>
      <dc:creator>rdegr</dc:creator>
      <dc:date>2018-10-19T13:13:47Z</dc:date>
    </item>
    <item>
      <title>Re: in selector json what is the 't' attribute</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/in-selector-json-what-is-the-t-attribute/m-p/548255#M1550</link>
      <description>&lt;P&gt;Got you. API 2.1.0 removed use internal interfaces to make API lighter.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Ignat Vilesov,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Software Engineer&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Microsoft Power BI Custom Visuals&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&lt;A href="mailto:pbicvsupport@microsoft.com" target="_blank"&gt;pbicvsupport@microsoft.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Oct 2018 07:29:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/in-selector-json-what-is-the-t-attribute/m-p/548255#M1550</guid>
      <dc:creator>v-viig</dc:creator>
      <dc:date>2018-10-22T07:29:25Z</dc:date>
    </item>
  </channel>
</rss>

