<?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: Help with dax in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-dax/m-p/3829764#M149739</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="720536" data-lia-user-login="siac161" class="lia-mention lia-mention-user"&gt;siac161&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;Maybe you can try the following DAX&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=""&gt;Percentage per Year = 
VAR TotalCountPerYear = CALCULATE(DISTINCTCOUNT(Table[ID]), ALL(Table), VALUES(Table[Year]))
VAR ClusterCount = DISTINCTCOUNT(Table[ID])
RETURN DIVIDE(ClusterCount, TotalCountPerYear)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P style="margin: 6.0pt 0cm 0cm 0cm;"&gt;&lt;SPAN&gt;If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 6.0pt 0cm 0cm 0cm;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 6.0pt 0cm 0cm 0cm;"&gt;&lt;SPAN&gt;&lt;A title="https://community.powerbi.com/t5/community-blog/how-to-get-your-question-answered-quickly/ba-p/38490" href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcommunity.powerbi.com%2Ft5%2FCommunity-Blog%2FHow-to-Get-Your-Question-Answered-Quickly%2Fba-p%2F38490&amp;amp;data=05%7C02%7Cv-yohua%40microsoft.com%7Ce1106bfabecb4734a5cc08dc2305bc51%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638423754744679080%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&amp;amp;sdata=24%2BceC5sFd3n3%2FhFDYILWFcNjCwVClBD%2BPBsSLVfJGk%3D&amp;amp;reserved=0" target="_blank" rel="noopener"&gt;How to Get Your Question Answered Quickly&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;Best Regards&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;Yongkang Hua&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;SPAN&gt;, then please consider&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 11 Apr 2024 06:57:12 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-04-11T06:57:12Z</dc:date>
    <item>
      <title>Help with dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-dax/m-p/3821045#M149438</link>
      <description>&lt;P&gt;Hi I'm trying to build a clustered chart.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;The Y axis are a column that have Regions.&lt;BR /&gt;The X axis is a distinct count of ID's&lt;BR /&gt;The legends are the Years&lt;BR /&gt;&lt;BR /&gt;The issue that I have is that I want to show the percentage of unique ID per year and region. Keeping other visualization filters, such as state, product category etc.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Region&lt;/TD&gt;&lt;TD&gt;2023&lt;/TD&gt;&lt;TD&gt;2024&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;25&lt;/TD&gt;&lt;TD&gt;30&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;30&lt;/TD&gt;&lt;TD&gt;15&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;35&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;40&lt;/TD&gt;&lt;TD&gt;40&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Total&lt;/TD&gt;&lt;TD&gt;130&lt;/TD&gt;&lt;TD&gt;95&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;So for example region 1 should show 19.23% for 2023 and 31.58% for 2024. But If I use the Distinct count option to "show as a percentage of the grand total" it doesn't make sense. I&lt;BR /&gt;&lt;BR /&gt;I created the next formula.&amp;nbsp;&lt;BR /&gt;Percentage per Year =&lt;BR /&gt;VAR TotalCountPerYear =&lt;BR /&gt;CALCULATE(DISTINCTCOUNT(Table[ID]), ALLEXCEPT(Table, Table[Year]))&lt;BR /&gt;&lt;BR /&gt;VAR ClusterCount =&lt;BR /&gt;DISTINCTCOUNT(TableName[ID])&lt;BR /&gt;&lt;BR /&gt;RETURN&lt;BR /&gt;DIVIDE(ClusterCount, TotalCountPerYear)&lt;BR /&gt;&lt;BR /&gt;But I can't make the total remain 130 or 95.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Apr 2024 22:04:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-dax/m-p/3821045#M149438</guid>
      <dc:creator>siac161</dc:creator>
      <dc:date>2024-04-08T22:04:23Z</dc:date>
    </item>
    <item>
      <title>Re: Help with dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-dax/m-p/3821211#M149445</link>
      <description>&lt;P&gt;Did you mean to select "Percentage of Column Total" ?&lt;/P&gt;</description>
      <pubDate>Tue, 09 Apr 2024 01:11:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-dax/m-p/3821211#M149445</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-04-09T01:11:47Z</dc:date>
    </item>
    <item>
      <title>Re: Help with dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-dax/m-p/3829764#M149739</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="720536" data-lia-user-login="siac161" class="lia-mention lia-mention-user"&gt;siac161&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;Maybe you can try the following DAX&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=""&gt;Percentage per Year = 
VAR TotalCountPerYear = CALCULATE(DISTINCTCOUNT(Table[ID]), ALL(Table), VALUES(Table[Year]))
VAR ClusterCount = DISTINCTCOUNT(Table[ID])
RETURN DIVIDE(ClusterCount, TotalCountPerYear)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P style="margin: 6.0pt 0cm 0cm 0cm;"&gt;&lt;SPAN&gt;If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 6.0pt 0cm 0cm 0cm;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 6.0pt 0cm 0cm 0cm;"&gt;&lt;SPAN&gt;&lt;A title="https://community.powerbi.com/t5/community-blog/how-to-get-your-question-answered-quickly/ba-p/38490" href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcommunity.powerbi.com%2Ft5%2FCommunity-Blog%2FHow-to-Get-Your-Question-Answered-Quickly%2Fba-p%2F38490&amp;amp;data=05%7C02%7Cv-yohua%40microsoft.com%7Ce1106bfabecb4734a5cc08dc2305bc51%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638423754744679080%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&amp;amp;sdata=24%2BceC5sFd3n3%2FhFDYILWFcNjCwVClBD%2BPBsSLVfJGk%3D&amp;amp;reserved=0" target="_blank" rel="noopener"&gt;How to Get Your Question Answered Quickly&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;Best Regards&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;Yongkang Hua&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;SPAN&gt;, then please consider&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2024 06:57:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-dax/m-p/3829764#M149739</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-04-11T06:57:12Z</dc:date>
    </item>
  </channel>
</rss>

