<?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: Percent of grand total showing incorrectly in column chart with small multiples. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percent-of-grand-total-showing-incorrectly-in-column-chart-with/m-p/3412958#M129059</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="500470" data-lia-user-login="sunilbeckham" class="lia-mention lia-mention-user"&gt;sunilbeckham&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to your description, here are my steps you can follow as a solution.&lt;/P&gt;
&lt;P&gt;(1) My test data is the same as yours.&lt;/P&gt;
&lt;P&gt;(2) We can create a measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = 
var _a=COUNTROWS(FILTER(ALLSELECTED('Table'),'Table'[Gender]=MAX('Table'[Gender])))
var _b=COUNTROWS(FILTER(ALLSELECTED('Table'),'Table'[Gender]=MAX('Table'[Gender]) &amp;amp;&amp;amp; 'Table'[Attendance]=MAX('Table'[Attendance])))
return DIVIDE(_b,_a)&lt;/LI-CODE&gt;
&lt;P&gt;(3) Then the result is as follows.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the above one can't help you get the desired result, please provide some&amp;nbsp;&lt;STRONG&gt;sample data&lt;/STRONG&gt;&amp;nbsp;in your tables (&lt;STRONG&gt;exclude&amp;nbsp;sensitive&amp;nbsp;data&lt;/STRONG&gt;) with&amp;nbsp;&lt;STRONG&gt;Text&lt;/STRONG&gt;&amp;nbsp;format and your&amp;nbsp;&lt;STRONG&gt;expected result&lt;/STRONG&gt;&amp;nbsp;with backend logic and special examples.&amp;nbsp;&lt;STRONG&gt;It is better&lt;/STRONG&gt;&amp;nbsp;if you can share a&amp;nbsp;&lt;STRONG&gt;simplified&lt;/STRONG&gt;&amp;nbsp;pbix file.&amp;nbsp;Thank you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Neeko Tang&lt;/P&gt;
&lt;P&gt;If this post  &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution &lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 04 Sep 2023 02:13:58 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-09-04T02:13:58Z</dc:date>
    <item>
      <title>Percent of grand total showing incorrectly in column chart with small multiples.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percent-of-grand-total-showing-incorrectly-in-column-chart-with/m-p/3409716#M128868</link>
      <description>&lt;P&gt;Hello! I'm trying to show the percentage calculation in a clustered column chart with small multiples of two. However, I can't seem to get the denominator value right in my visual. My table looks something like this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;Student Number&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Gender&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Attendance&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;TD&gt;Male&lt;/TD&gt;&lt;TD&gt;Very Good&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;101&lt;/TD&gt;&lt;TD&gt;Female&lt;/TD&gt;&lt;TD&gt;Very Good&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;102&lt;/TD&gt;&lt;TD&gt;Female&lt;/TD&gt;&lt;TD&gt;Inconsistent&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;103&lt;/TD&gt;&lt;TD&gt;Male&lt;/TD&gt;&lt;TD&gt;Poor&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;104&lt;/TD&gt;&lt;TD&gt;Male&lt;/TD&gt;&lt;TD&gt;Good&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently, I'm plotting this information in a chart with small multiples of Gender column, X axis of Attendance column, and Y axis being a simple COUNTA(Student Number) column that I show as Percent of grand total. Here's the screenshot of how it looks presently:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Expected result is that each gender field should have a combined total of 100% across the 4 attendance categories. For example, in this visual it should display something like this:&lt;BR /&gt;Female- Very Good = 40%, Good = 30%, Inconsistent = 20%, Poor = 10%&lt;BR /&gt;Male- Very Good = 30%, Good = 30%, Inconsistent = 20%, Poor = 20%&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2023 20:23:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percent-of-grand-total-showing-incorrectly-in-column-chart-with/m-p/3409716#M128868</guid>
      <dc:creator>sunilbeckham</dc:creator>
      <dc:date>2023-08-31T20:23:42Z</dc:date>
    </item>
    <item>
      <title>Re: Percent of grand total showing incorrectly in column chart with small multiples.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percent-of-grand-total-showing-incorrectly-in-column-chart-with/m-p/3412958#M129059</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="500470" data-lia-user-login="sunilbeckham" class="lia-mention lia-mention-user"&gt;sunilbeckham&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to your description, here are my steps you can follow as a solution.&lt;/P&gt;
&lt;P&gt;(1) My test data is the same as yours.&lt;/P&gt;
&lt;P&gt;(2) We can create a measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = 
var _a=COUNTROWS(FILTER(ALLSELECTED('Table'),'Table'[Gender]=MAX('Table'[Gender])))
var _b=COUNTROWS(FILTER(ALLSELECTED('Table'),'Table'[Gender]=MAX('Table'[Gender]) &amp;amp;&amp;amp; 'Table'[Attendance]=MAX('Table'[Attendance])))
return DIVIDE(_b,_a)&lt;/LI-CODE&gt;
&lt;P&gt;(3) Then the result is as follows.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the above one can't help you get the desired result, please provide some&amp;nbsp;&lt;STRONG&gt;sample data&lt;/STRONG&gt;&amp;nbsp;in your tables (&lt;STRONG&gt;exclude&amp;nbsp;sensitive&amp;nbsp;data&lt;/STRONG&gt;) with&amp;nbsp;&lt;STRONG&gt;Text&lt;/STRONG&gt;&amp;nbsp;format and your&amp;nbsp;&lt;STRONG&gt;expected result&lt;/STRONG&gt;&amp;nbsp;with backend logic and special examples.&amp;nbsp;&lt;STRONG&gt;It is better&lt;/STRONG&gt;&amp;nbsp;if you can share a&amp;nbsp;&lt;STRONG&gt;simplified&lt;/STRONG&gt;&amp;nbsp;pbix file.&amp;nbsp;Thank you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Neeko Tang&lt;/P&gt;
&lt;P&gt;If this post  &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution &lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Sep 2023 02:13:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percent-of-grand-total-showing-incorrectly-in-column-chart-with/m-p/3412958#M129059</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-09-04T02:13:58Z</dc:date>
    </item>
    <item>
      <title>Re: Percent of grand total showing incorrectly in column chart with small multiples.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percent-of-grand-total-showing-incorrectly-in-column-chart-with/m-p/3424827#M129713</link>
      <description>&lt;P&gt;Thank you so much for your response and providing the PBIX file. I tried a similar approach to yours and it worked for me. I ended up writing this measure:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;DIVIDE(COUNTA(Student Number),
CALCULATE(COUNTA(Student Number), ALLSELECTED(Table), VALUES(Table[Gender]) ))&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;I appreciate your input and help regarding this. Thank You!&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2023 17:37:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percent-of-grand-total-showing-incorrectly-in-column-chart-with/m-p/3424827#M129713</guid>
      <dc:creator>sunilbeckham</dc:creator>
      <dc:date>2023-09-11T17:37:23Z</dc:date>
    </item>
  </channel>
</rss>

