<?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: Does anyone have a working example of the Customized data reduction capabilities? in Custom Visuals Development Discussion</title>
    <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Does-anyone-have-a-working-example-of-the-Customized-data/m-p/3032427#M6611</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/22039"&gt;@saviourofdp&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I have looked into it a little bit when it released and I found that I had to have my objects and properties named exactly as per the example, i.e. my object had to be named&amp;nbsp;&lt;SPAN&gt;&lt;FONT face="courier new,courier"&gt;dataReductionCustomization&lt;/FONT&gt;, and (as I was using a &lt;FONT face="courier new,courier"&gt;categorical&lt;/FONT&gt; mapping), I had to name my property &lt;FONT face="courier new,courier"&gt;categoryCount&lt;/FONT&gt; (&lt;A href="https://github.com/microsoft/powerbi-visuals-api/blob/bb511624cc330d47554cbf80b119199194f5235e/schema.capabilities.json#L1574" target="_self"&gt;as per the schema definition here&lt;/A&gt;).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;For instance, I was trying to add these to an existing object with a different name in my &lt;FONT face="courier new,courier"&gt;capabilities.json&lt;/FONT&gt;, and it wouldn't work, despite me updating the root&amp;nbsp;&lt;SPAN&gt;&lt;FONT face="courier new,courier"&gt;dataReductionCustomization&lt;/FONT&gt; object to point to this revised object and property&lt;/SPAN&gt;.&amp;nbsp;Not sure if that's something you might have done?&lt;/P&gt;
&lt;P&gt;This hard-coding of names wasn't acceptable for me, as I wanted to consolidate my properties, so I didn't keep my example, unfortunately, but it did work when everything was named as per the documentation.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
    <pubDate>Thu, 19 Jan 2023 20:54:07 GMT</pubDate>
    <dc:creator>dm-p</dc:creator>
    <dc:date>2023-01-19T20:54:07Z</dc:date>
    <item>
      <title>Does anyone have a working example of the Customized data reduction capabilities in a matrix?</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Does-anyone-have-a-working-example-of-the-Customized-data/m-p/3030980#M6599</link>
      <description>&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to set this up for a matrix visual following the documentation here:&amp;nbsp;&lt;A title="Customized data reduction" href="https://learn.microsoft.com/en-gb/power-bi/developer/visuals/fetch-more-data#customized-data-reduction" target="_blank" rel="noopener"&gt;Customized data reduction&lt;/A&gt;&amp;nbsp;but I can't seem to get it to work. I've updated my project to use API 5.2 and I've updated the capabilites file with the exact code from that page but the properties don't appear in the format pane. Does anyone have an example of this working?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2023 15:39:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Does-anyone-have-a-working-example-of-the-Customized-data/m-p/3030980#M6599</guid>
      <dc:creator>saviourofdp</dc:creator>
      <dc:date>2023-01-23T15:39:54Z</dc:date>
    </item>
    <item>
      <title>Re: Does anyone have a working example of the Customized data reduction capabilities?</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Does-anyone-have-a-working-example-of-the-Customized-data/m-p/3032427#M6611</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/22039"&gt;@saviourofdp&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I have looked into it a little bit when it released and I found that I had to have my objects and properties named exactly as per the example, i.e. my object had to be named&amp;nbsp;&lt;SPAN&gt;&lt;FONT face="courier new,courier"&gt;dataReductionCustomization&lt;/FONT&gt;, and (as I was using a &lt;FONT face="courier new,courier"&gt;categorical&lt;/FONT&gt; mapping), I had to name my property &lt;FONT face="courier new,courier"&gt;categoryCount&lt;/FONT&gt; (&lt;A href="https://github.com/microsoft/powerbi-visuals-api/blob/bb511624cc330d47554cbf80b119199194f5235e/schema.capabilities.json#L1574" target="_self"&gt;as per the schema definition here&lt;/A&gt;).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;For instance, I was trying to add these to an existing object with a different name in my &lt;FONT face="courier new,courier"&gt;capabilities.json&lt;/FONT&gt;, and it wouldn't work, despite me updating the root&amp;nbsp;&lt;SPAN&gt;&lt;FONT face="courier new,courier"&gt;dataReductionCustomization&lt;/FONT&gt; object to point to this revised object and property&lt;/SPAN&gt;.&amp;nbsp;Not sure if that's something you might have done?&lt;/P&gt;
&lt;P&gt;This hard-coding of names wasn't acceptable for me, as I wanted to consolidate my properties, so I didn't keep my example, unfortunately, but it did work when everything was named as per the documentation.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2023 20:54:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Does-anyone-have-a-working-example-of-the-Customized-data/m-p/3032427#M6611</guid>
      <dc:creator>dm-p</dc:creator>
      <dc:date>2023-01-19T20:54:07Z</dc:date>
    </item>
    <item>
      <title>Re: Does anyone have a working example of the Customized data reduction capabilities?</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Does-anyone-have-a-working-example-of-the-Customized-data/m-p/3033416#M6615</link>
      <description>&lt;P&gt;thanks for the reply&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/397"&gt;@dm-p&lt;/a&gt;&amp;nbsp;. Was your example purely capabilities.json changes or did you have to change anything in settings.ts, enumerateObjectInstances or the new formattingModel API?&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2023 09:10:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Does-anyone-have-a-working-example-of-the-Customized-data/m-p/3033416#M6615</guid>
      <dc:creator>saviourofdp</dc:creator>
      <dc:date>2023-01-20T09:10:30Z</dc:date>
    </item>
    <item>
      <title>Re: Does anyone have a working example of the Customized data reduction capabilities?</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Does-anyone-have-a-working-example-of-the-Customized-data/m-p/3036403#M6667</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/22039"&gt;@saviourofdp&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I had to add a suitable class and properties to my visual settings that correspond to the capabilities (as has always been the way), otherwise these properties are not accessible to your &lt;FONT face="courier new,courier"&gt;VisualSettings&lt;/FONT&gt; class (or whatever name you have chosen for it). If your e&lt;FONT face="courier new,courier"&gt;numerateObjectInstances&lt;/FONT&gt; method has standard logic to populate the pane and you're not overriding your own containers too heavily, then there shouldn't be anything you need to do. However if you are doing this then it's going to depend on how you're building them.&lt;/P&gt;
&lt;P&gt;If you're using the new formatting model (cards) that were&amp;nbsp; introduced in API 5.1, you still need to add settings classes and properties -&amp;nbsp;and the &lt;A href="https://learn.microsoft.com/en-us/power-bi/developer/visuals/custom-visual-develop-tutorial-format-options#:~:text=In%20the%20settings.ts%20file%2C%20replace%20the%20import%20lines%20and%20two%20classes%20with%20the%20following%20code." target="_self"&gt;revised guide to the formatting pane still includes this step&lt;/A&gt; if you need to confirm what this should look like - but you won't need to use &lt;FONT face="courier new,courier"&gt;enumerateObjectInstances&lt;/FONT&gt; if using the new pane; I believe the new &lt;FONT face="courier new,courier"&gt;powerbi-visuals-utils-formattingmodel package&lt;/FONT&gt; takes care of that if you're using them. If not, then you will need to set up your own overridden &lt;FONT face="courier new,courier"&gt;getFormattingModel&lt;/FONT&gt; method in the Visual class that has your logic to return a valid &lt;FONT face="courier new,courier"&gt;FormattingModel&lt;/FONT&gt;.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Sun, 22 Jan 2023 21:04:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Does-anyone-have-a-working-example-of-the-Customized-data/m-p/3036403#M6667</guid>
      <dc:creator>dm-p</dc:creator>
      <dc:date>2023-01-22T21:04:31Z</dc:date>
    </item>
    <item>
      <title>Re: Does anyone have a working example of the Customized data reduction capabilities?</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Does-anyone-have-a-working-example-of-the-Customized-data/m-p/3038166#M6672</link>
      <description>&lt;P&gt;Thanks for your help&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/397"&gt;@dm-p&lt;/a&gt;&amp;nbsp;. I've found that for a matrix to work, the relevant sections in the capabilities file needs to look like the following. In particular, the row algorithm needs to be set as &lt;I&gt;window&amp;nbsp;&lt;/I&gt;and columns algorithm needs to be set as&amp;nbsp;something other than&lt;EM&gt; window&lt;/EM&gt;. Otherwise, I see an error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
    "dataRoles": [
        {
            "displayName": "Row Data",
            "name": "rows",
            "kind": "Grouping"
        },
        {
            "displayName": "Column Data",
            "name": "columns",
            "kind": "Grouping"
        },
        {
            "displayName": "Measure Data",
            "name": "values",
            "kind": "Measure"
        }
    ],
    "objects": {
        "dataReductionCustomization": {
            "properties": {
                "columnCount": {
                    "type": {
                        "numeric": true
                    }
                },
                "rowCount": {
                    "type": {
                        "numeric": true
                    }
                }
            }
        }
    },
    "privileges": [],
    "dataViewMappings": [
        {
            "matrix": {
                "dataVolume": 6,
                "rows": {
                    "for": {
                        "in": "rows"
                    },
                    "dataReductionAlgorithm": {
                        "window": {
                            "count": 10
                        }
                    }
                },
                "columns": {
                    "for": {
                        "in": "columns"
                    },
                    "dataReductionAlgorithm": {
                        "sample": {
                            "count": 10
                        }
                    }
                },
                "values": {
                    "select": [
                        {
                            "for": {
                                "in": "values"
                            }
                        }
                    ]
                }
            }
        }
    ],
    "dataReductionCustomization": {
        "matrix": {
            "columnCount": {
                "defaultValue": 100,
                "propertyIdentifier": {
                    "objectName": "dataReductionCustomization",
                    "propertyName": "columnCount"
                }
            },
            "rowCount": {
                "defaultValue": 100,
                "propertyIdentifier": {
                    "objectName": "dataReductionCustomization",
                    "propertyName": "rowCount"
                }
            }
        }
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2023 16:53:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Does-anyone-have-a-working-example-of-the-Customized-data/m-p/3038166#M6672</guid>
      <dc:creator>saviourofdp</dc:creator>
      <dc:date>2023-01-23T16:53:39Z</dc:date>
    </item>
  </channel>
</rss>

