<?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 Percentage by Multiple Category in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentage-by-Multiple-Category/m-p/3182996#M115120</link>
    <description>&lt;P&gt;HI all, so I've been having this problem of calculating percentages by multiple categories. Here's a sample dataset:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;ID&lt;/TD&gt;&lt;TD&gt;Status&lt;/TD&gt;&lt;TD&gt;Month&lt;/TD&gt;&lt;TD&gt;Category&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ID1&lt;/TD&gt;&lt;TD&gt;Complete&lt;/TD&gt;&lt;TD&gt;Jan&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ID2&lt;/TD&gt;&lt;TD&gt;Incomplete&lt;/TD&gt;&lt;TD&gt;Feb&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ID3&lt;/TD&gt;&lt;TD&gt;Complete&lt;/TD&gt;&lt;TD&gt;Mar&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ID4&lt;/TD&gt;&lt;TD&gt;Incomplete&lt;/TD&gt;&lt;TD&gt;Mar&lt;/TD&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ID5&lt;/TD&gt;&lt;TD&gt;Complete&lt;/TD&gt;&lt;TD&gt;Feb&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ID6&lt;/TD&gt;&lt;TD&gt;Incomplete&lt;/TD&gt;&lt;TD&gt;Jan&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;C&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;So the ideal result would be to have a monthly percentage of IDs in a category that is complete compared to&amp;nbsp; incomplete. For example if in January there are a total of 10 ID in category A, 8 of which are complete and 2 are incomplete. This would return a percentage of 8/10 or 80%. The visualization I want to show is a clustered chart showing the percentage for each category in each month, kinda like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Consider that each color is the category. Any inputs will be welcome, thanks in advance!&lt;/P&gt;</description>
    <pubDate>Wed, 12 Apr 2023 02:32:45 GMT</pubDate>
    <dc:creator>ilhamfadhillah4</dc:creator>
    <dc:date>2023-04-12T02:32:45Z</dc:date>
    <item>
      <title>Percentage by Multiple Category</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentage-by-Multiple-Category/m-p/3182996#M115120</link>
      <description>&lt;P&gt;HI all, so I've been having this problem of calculating percentages by multiple categories. Here's a sample dataset:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;ID&lt;/TD&gt;&lt;TD&gt;Status&lt;/TD&gt;&lt;TD&gt;Month&lt;/TD&gt;&lt;TD&gt;Category&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ID1&lt;/TD&gt;&lt;TD&gt;Complete&lt;/TD&gt;&lt;TD&gt;Jan&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ID2&lt;/TD&gt;&lt;TD&gt;Incomplete&lt;/TD&gt;&lt;TD&gt;Feb&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ID3&lt;/TD&gt;&lt;TD&gt;Complete&lt;/TD&gt;&lt;TD&gt;Mar&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ID4&lt;/TD&gt;&lt;TD&gt;Incomplete&lt;/TD&gt;&lt;TD&gt;Mar&lt;/TD&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ID5&lt;/TD&gt;&lt;TD&gt;Complete&lt;/TD&gt;&lt;TD&gt;Feb&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ID6&lt;/TD&gt;&lt;TD&gt;Incomplete&lt;/TD&gt;&lt;TD&gt;Jan&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;C&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;So the ideal result would be to have a monthly percentage of IDs in a category that is complete compared to&amp;nbsp; incomplete. For example if in January there are a total of 10 ID in category A, 8 of which are complete and 2 are incomplete. This would return a percentage of 8/10 or 80%. The visualization I want to show is a clustered chart showing the percentage for each category in each month, kinda like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Consider that each color is the category. Any inputs will be welcome, thanks in advance!&lt;/P&gt;</description>
      <pubDate>Wed, 12 Apr 2023 02:32:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentage-by-Multiple-Category/m-p/3182996#M115120</guid>
      <dc:creator>ilhamfadhillah4</dc:creator>
      <dc:date>2023-04-12T02:32:45Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage by Multiple Category</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentage-by-Multiple-Category/m-p/3183045#M115124</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="530733" data-lia-user-login="ilhamfadhillah4" class="lia-mention lia-mention-user"&gt;ilhamfadhillah4&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try to feed a measure like below to the value field of your cluster bar chart:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Measure =
DIVIDE(
    CALCULATE(
        COUNT(TableName[ID]),
        TableName[Status]="Complete"
    ),
    COUNT(TableName[ID])
)&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 12 Apr 2023 03:11:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentage-by-Multiple-Category/m-p/3183045#M115124</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-04-12T03:11:45Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage by Multiple Category</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentage-by-Multiple-Category/m-p/3183067#M115126</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am not sure if I undersood your question correctly, but I tried to create a sample pbix file like below.&lt;/P&gt;
&lt;P&gt;Please check the below picture and the attached pbix file.&lt;/P&gt;
&lt;P&gt;I hope the below can provide some ideas on how to create a solution for your datamodel.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Expected result measure: =
VAR _count =
    COUNTROWS ( Data )
VAR _completecount =
    CALCULATE ( COUNTROWS ( Data ), Data[Status] = "Complete" )
RETURN
    DIVIDE ( _completecount, _count )
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Apr 2023 03:28:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentage-by-Multiple-Category/m-p/3183067#M115126</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2023-04-12T03:28:01Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage by Multiple Category</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentage-by-Multiple-Category/m-p/3183192#M115137</link>
      <description>&lt;P&gt;Edit: It works! Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi Jihwan,&lt;/P&gt;&lt;P&gt;Tried your solution, but somehow it returns like this&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Seems like it returns a 100%. Do you know where it might went wrong? I followed your formula exactly the same.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Apr 2023 05:23:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentage-by-Multiple-Category/m-p/3183192#M115137</guid>
      <dc:creator>ilhamfadhillah4</dc:creator>
      <dc:date>2023-04-12T05:23:12Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage by Multiple Category</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentage-by-Multiple-Category/m-p/3183194#M115138</link>
      <description>&lt;P&gt;Edit: It works! Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi Freeman,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tried your solution, it also returns a 100% like my other reply to Jihwan.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Apr 2023 05:23:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentage-by-Multiple-Category/m-p/3183194#M115138</guid>
      <dc:creator>ilhamfadhillah4</dc:creator>
      <dc:date>2023-04-12T05:23:25Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage by Multiple Category</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentage-by-Multiple-Category/m-p/3184720#M115254</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I do not know how your datamodel looks like, and I assume your datamodel looks different than my sample. And I guess your column [DataStatus] is sorted by another column. Try something like the below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Expected result measure: =
VAR _count =
    COUNTROWS ( Data )
VAR _completecount =
    CALCULATE (
        COUNTROWS ( Data ),
        FILTER ( ALLSELECTED ( Data ), Data[Status] = "Complete" )
    )
RETURN
    DIVIDE ( _completecount, _count )
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Apr 2023 17:52:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentage-by-Multiple-Category/m-p/3184720#M115254</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2023-04-12T17:52:04Z</dc:date>
    </item>
  </channel>
</rss>

