<?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: How to calculate percentage of each group out of total number of distinct rows in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-percentage-of-each-group-out-of-total-number-of/m-p/4310483#M171182</link>
    <description>&lt;P&gt;Please provide sample data that covers your issue or question &lt;STRONG&gt;completely&lt;/STRONG&gt;, in a &lt;STRONG&gt;usable&lt;/STRONG&gt; format (not as a screenshot).&lt;BR /&gt;Do not include sensitive information. Do not include anything that is unrelated to the issue or question. &lt;BR /&gt;Please show the expected outcome based on the sample data you provided. &lt;BR /&gt;&lt;BR /&gt;Need help uploading data? &lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216&lt;/A&gt; &lt;BR /&gt;Want faster answers? &lt;A href="https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 02 Dec 2024 22:21:47 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2024-12-02T22:21:47Z</dc:date>
    <item>
      <title>How to calculate percentage of each group out of total number of distinct rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-percentage-of-each-group-out-of-total-number-of/m-p/4310338#M171174</link>
      <description>&lt;P&gt;Hello!&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table that looking at type of insurances that customers have and customers could select more than one type, however ultimately, I would like to create a visual in my dashboard that shows the percentage of responses for each insurance type OVER the DISTINCT number of respondents. For example, if 301 people selected 'Medicaid' (this includes folks who selected only Medicaid or selected Medicaid and other types of insurance, for the numerator all I care about is that they selected 'Medicaid') out of 861 DISTINCT individuals who responded to the survey, &lt;STRONG&gt;how do I get a percentage that reflects non-distinct count per group OVER a distinct number of IDs?&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Here is my visual thus far:&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;&lt;/P&gt;&lt;P&gt;&amp;nbsp;^The percentages you see at the bottom of each square in the tree map DO represent what I am looking for, for example 301/861 folks= 34.96% selected Medicare, however I had calculated that in R before exporting to Excel and then importing into Power BI. I want to calculate this however IN Power BI if possible instead because when I try to filter based on age, educational level, etc. as seen on the right-side of the screen, those percentages do not change.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my table that the visual is based on- column &lt;STRONG&gt;Q1&lt;/STRONG&gt;= ID of individual, column &lt;STRONG&gt;insurance&lt;/STRONG&gt;= insurance type, &lt;STRONG&gt;total_insurance=&amp;nbsp;&lt;/STRONG&gt;distinct count of Q1 &lt;STRONG&gt;(I calculated this in R)&amp;nbsp;&lt;/STRONG&gt;&amp;amp; &lt;STRONG&gt;count_insurance&lt;/STRONG&gt;=count of &lt;STRONG&gt;insurance&lt;/STRONG&gt; by group /&lt;STRONG&gt;total_insurance, again calculated in R. Any suggestions for how to calculcate total_insurance &amp;amp; count_insurance in PowerBI rather than bringing them over from R would be much appreciated, thank you!&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;How do I recreate these last two columns exactly as they are but using a calculation made in PowerBI rather than R?^&lt;/P&gt;&lt;P&gt;Attached is a PowerBI workbook at this link in Dropbox &lt;A title="insurance_long.pbix" href="https://www.dropbox.com/scl/fi/fmtzurp0k6jkl36bk7qll/insurance_long.pbix?rlkey=i6ph2ji5ll9hwicv14yjtcg5q&amp;amp;st=upw9xiot&amp;amp;dl=0" target="_self"&gt;https://www.dropbox.com/scl/fi/fmtzurp0k6jkl36bk7qll/insurance_long.pbix?rlkey=i6ph2ji5ll9hwicv14yjtcg5q&amp;amp;st=upw9xiot&amp;amp;dl=0&lt;/A&gt;&amp;nbsp;.&lt;/P&gt;&lt;P&gt;The table in my screenshot&amp;nbsp; above is for the insurance_long table in the PowerBI workbook. The sheet_na table in the PowerBI workbook contains the ID "Q1" and the age category variable used as a filter on the far right of the visual "Q4_cat" and then there is also a table for race as that also serves as one of the filters. Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2024 03:37:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-percentage-of-each-group-out-of-total-number-of/m-p/4310338#M171174</guid>
      <dc:creator>EtoiledeMO</dc:creator>
      <dc:date>2024-12-03T03:37:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate percentage of each group out of total number of distinct rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-percentage-of-each-group-out-of-total-number-of/m-p/4310483#M171182</link>
      <description>&lt;P&gt;Please provide sample data that covers your issue or question &lt;STRONG&gt;completely&lt;/STRONG&gt;, in a &lt;STRONG&gt;usable&lt;/STRONG&gt; format (not as a screenshot).&lt;BR /&gt;Do not include sensitive information. Do not include anything that is unrelated to the issue or question. &lt;BR /&gt;Please show the expected outcome based on the sample data you provided. &lt;BR /&gt;&lt;BR /&gt;Need help uploading data? &lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216&lt;/A&gt; &lt;BR /&gt;Want faster answers? &lt;A href="https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2024 22:21:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-percentage-of-each-group-out-of-total-number-of/m-p/4310483#M171182</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-12-02T22:21:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate percentage of each group out of total number of distinct rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-percentage-of-each-group-out-of-total-number-of/m-p/4310804#M171194</link>
      <description>&lt;P&gt;Thank you! I have now added a Dropbox link to my PowerBI workbook and some clarifying sentences.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2024 03:38:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-percentage-of-each-group-out-of-total-number-of/m-p/4310804#M171194</guid>
      <dc:creator>EtoiledeMO</dc:creator>
      <dc:date>2024-12-03T03:38:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate percentage of each group out of total number of distinct rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-percentage-of-each-group-out-of-total-number-of/m-p/4312177#M171262</link>
      <description>&lt;P&gt;I have cleaned up your data model, and removed the extra columns.&amp;nbsp; Your result can be achieved with a measure,&amp;nbsp; but you will need to accept that it doesn't add up to 100%&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;Using the implicit Percentage of Grand Total would be the better option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2024 20:50:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-percentage-of-each-group-out-of-total-number-of/m-p/4312177#M171262</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-12-03T20:50:11Z</dc:date>
    </item>
  </channel>
</rss>

