<?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 Variance report using Metrics visual and static table in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Variance-report-using-Metrics-visual-and-static-table/m-p/1886510#M29821</link>
    <description>&lt;P&gt;I am trying to create a &lt;STRONG&gt;variance report&lt;/STRONG&gt; using a &lt;U&gt;Metrics visual&lt;/U&gt; and a &lt;U&gt;static table&lt;/U&gt; (that I am thinking about having a static data in SQL).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I created a metric visual as shown below:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JustinDoh1_0-1623104554075.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/529062iA26ED87B8605060C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JustinDoh1_0-1623104554075.png" alt="JustinDoh1_0-1623104554075.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;These numbers were generated based on Count of outcome for each rows.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JustinDoh1_2-1623105012979.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/529066i7D6F44C496616A3D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JustinDoh1_2-1623105012979.png" alt="JustinDoh1_2-1623105012979.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have an illustration of data in a similar fashion (tabular) that I am trying to set up as a static table in SQL as shown below:&lt;/P&gt;&lt;P&gt;This data/table will eventually be used to do the variance report (find the difference on same category).&lt;/P&gt;&lt;P&gt;These data are not created in a table yet.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JustinDoh1_1-1623104718721.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/529065i5EAEA105E5FAFAFA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JustinDoh1_1-1623104718721.png" alt="JustinDoh1_1-1623104718721.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Now, I am trying to find the best approach to prepare data for the second table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't think having a dummy data that repeats each row (just to create a Count for Aggregation) makes sense.&lt;/P&gt;&lt;P&gt;I guess the issue is how to compare data, one in visual (that have been aggregated in metrics) and other that have not been prepared yet.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for help!&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;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, 07 Jun 2021 22:54:24 GMT</pubDate>
    <dc:creator>JustinDoh1</dc:creator>
    <dc:date>2021-06-07T22:54:24Z</dc:date>
    <item>
      <title>Variance report using Metrics visual and static table</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Variance-report-using-Metrics-visual-and-static-table/m-p/1886510#M29821</link>
      <description>&lt;P&gt;I am trying to create a &lt;STRONG&gt;variance report&lt;/STRONG&gt; using a &lt;U&gt;Metrics visual&lt;/U&gt; and a &lt;U&gt;static table&lt;/U&gt; (that I am thinking about having a static data in SQL).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I created a metric visual as shown below:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JustinDoh1_0-1623104554075.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/529062iA26ED87B8605060C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JustinDoh1_0-1623104554075.png" alt="JustinDoh1_0-1623104554075.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;These numbers were generated based on Count of outcome for each rows.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JustinDoh1_2-1623105012979.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/529066i7D6F44C496616A3D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JustinDoh1_2-1623105012979.png" alt="JustinDoh1_2-1623105012979.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have an illustration of data in a similar fashion (tabular) that I am trying to set up as a static table in SQL as shown below:&lt;/P&gt;&lt;P&gt;This data/table will eventually be used to do the variance report (find the difference on same category).&lt;/P&gt;&lt;P&gt;These data are not created in a table yet.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JustinDoh1_1-1623104718721.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/529065i5EAEA105E5FAFAFA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JustinDoh1_1-1623104718721.png" alt="JustinDoh1_1-1623104718721.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Now, I am trying to find the best approach to prepare data for the second table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't think having a dummy data that repeats each row (just to create a Count for Aggregation) makes sense.&lt;/P&gt;&lt;P&gt;I guess the issue is how to compare data, one in visual (that have been aggregated in metrics) and other that have not been prepared yet.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for help!&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;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, 07 Jun 2021 22:54:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Variance-report-using-Metrics-visual-and-static-table/m-p/1886510#M29821</guid>
      <dc:creator>JustinDoh1</dc:creator>
      <dc:date>2021-06-07T22:54:24Z</dc:date>
    </item>
    <item>
      <title>Re: Variance report using Metrics visual and static table</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Variance-report-using-Metrics-visual-and-static-table/m-p/1892305#M29866</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/296339"&gt;@JustinDoh1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think you want to build a static table in data model like second screenshot.&lt;/P&gt;
&lt;P&gt;You can try to use Power Query to transform your data model. I build a sample like yours to have a test.&lt;/P&gt;
&lt;P&gt;Sample:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 354px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/531042iAD04A3EA57916811/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Matrix:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2.png" style="width: 926px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/531043i3A26FA0BF25194A4/image-size/large?v=v2&amp;amp;px=999" role="button" title="2.png" alt="2.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Firstly we need to use Group By function to get Count column as below.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="3.png" style="width: 955px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/531044i44E697822703048E/image-size/large?v=v2&amp;amp;px=999" role="button" title="3.png" alt="3.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Then we pivote "Matrix Column" as below to get the result.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="4.png" style="width: 892px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/531045i8F149D8387E3194E/image-size/large?v=v2&amp;amp;px=999" role="button" title="4.png" alt="4.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Rico Zhou&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt; to help the other members find it more quickly.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jun 2021 03:42:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Variance-report-using-Metrics-visual-and-static-table/m-p/1892305#M29866</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-06-10T03:42:52Z</dc:date>
    </item>
    <item>
      <title>Re: Variance report using Metrics visual and static table</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Variance-report-using-Metrics-visual-and-static-table/m-p/1894130#M29888</link>
      <description>&lt;P&gt;@Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much for your feedback.&lt;/P&gt;&lt;P&gt;I ended up doing this process:&lt;/P&gt;&lt;P&gt;1) Created a static table (Table2) for the second data.&lt;/P&gt;&lt;P&gt;2) Created a joined key (called 'JoinKey') for the two tables (Table1 and Table2).&lt;/P&gt;&lt;P&gt;3) I joined Many to Many relationship for the two tables (using the joined key 'JoinKey').&lt;/P&gt;&lt;P&gt;4) Tried with Quick Measure (for the first time &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; ).&lt;/P&gt;&lt;P&gt;It generated a measure like this:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Count of JoinKey minus Count of JoinKey = COUNTA('table1'[JoinKey]) -&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;COUNTA('table2'[JoinKey]) &lt;/STRONG&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It worked somehow.&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a question. What is &lt;STRONG&gt;risk&lt;/STRONG&gt; of having Many to Many relationship?&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jun 2021 18:14:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Variance-report-using-Metrics-visual-and-static-table/m-p/1894130#M29888</guid>
      <dc:creator>JustinDoh1</dc:creator>
      <dc:date>2021-06-10T18:14:00Z</dc:date>
    </item>
  </channel>
</rss>

