<?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: Percentage based on specific row in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentage-based-on-specific-row/m-p/2988011#M100396</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="419200" data-lia-user-login="angsoka" class="lia-mention lia-mention-user"&gt;angsoka&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How will you select ALL-ALL in the Country slicer and expect the table to show Indonesia and Thailand?&lt;/P&gt;
&lt;P&gt;If you select ALL-ALL, the table will show ALL-ALL. You'll need to change the structure of your table&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE style="height: 100px; width: 100%; border-collapse: collapse; border-style: groove; border-color: #0c1c49; background-color: #00675f;" border="0" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15px;"&gt;
&lt;TD width="15.961305925030231%" style="width: 92px; height: 15px;"&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="84.03869407496977%" style="width: 485px; height: 15px; text-align: left;"&gt;&lt;FONT color="#FFFFFF"&gt;&lt;SPAN&gt;&lt;STRONG&gt;Please accept the solution when done and consider &lt;FONT color="#FF9900"&gt;giving a thumbs up if posts are helpful.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT color="#FFFFFF"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt; &lt;/FONT&gt;&lt;BR /&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT size="4.5" color="#FF99CC"&gt;Contact me privately for support with any larger-scale BI needs, tutoring, etc.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 25 Dec 2022 20:38:17 GMT</pubDate>
    <dc:creator>AlB</dc:creator>
    <dc:date>2022-12-25T20:38:17Z</dc:date>
    <item>
      <title>Percentage based on specific row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentage-based-on-specific-row/m-p/2988002#M100393</link>
      <description>&lt;P&gt;Dear all,&lt;BR /&gt;&lt;BR /&gt;I want to create a &lt;STRONG&gt;measure&lt;/STRONG&gt; &lt;STRONG&gt;on powerpivot&lt;/STRONG&gt; which calculate the export percentage on specific rows. Below is the part of the data. ALL-ALL means that it is the total export of every country.&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;id Country&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Country&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Status&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;id Commodity&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Commodity&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Export&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1301&lt;/TD&gt;&lt;TD&gt;Indonesia&lt;/TD&gt;&lt;TD&gt;State&lt;/TD&gt;&lt;TD&gt;785&lt;/TD&gt;&lt;TD&gt;Motorcycle&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1301&lt;/TD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TD&gt;&lt;TD&gt;781&lt;/TD&gt;&lt;TD&gt;Car&lt;/TD&gt;&lt;TD&gt;80&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to have a pivot table filtered by Commodity (Car or Motorcycle), Status (State or Area), and Area (ALL-ALL or ALL-ASIA)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Commodity&lt;/TD&gt;&lt;TD&gt;Car&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Status&lt;/TD&gt;&lt;TD&gt;State&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Country&lt;/TD&gt;&lt;TD&gt;ALL-ALL&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;Country&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Export Share&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Indonesia&lt;/TD&gt;&lt;TD&gt;=20/200&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Thailand&lt;/TD&gt;&lt;TD&gt;=40/200&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;I have tried to create a measure below, but it doesn't work.&lt;BR /&gt;&lt;BR /&gt;Export Share :=&lt;BR /&gt;DIVIDE(&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;SUM('Table'[Export]),&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;CALCULATE(&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SUM('Table'[Export])&lt;BR /&gt;&lt;!--  StartFragment   --&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FILTER&lt;/SPAN&gt;&lt;SPAN class=""&gt;(Table,Table[Commodity] = &lt;SPAN class=""&gt;"Car" &amp;amp;&amp;amp;&amp;nbsp;&lt;/SPAN&gt;Table[Status] = &lt;/SPAN&gt;&lt;SPAN class=""&gt;"State" &amp;amp;&amp;amp;&amp;nbsp;&lt;SPAN class=""&gt;Table[Country] = &lt;/SPAN&gt;"ALL-ALL"&lt;/SPAN&gt;&lt;SPAN class=""&gt;))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;!--  EndFragment   --&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help is appreciated!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;angsoka&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 25 Dec 2022 19:32:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentage-based-on-specific-row/m-p/2988002#M100393</guid>
      <dc:creator>angsoka</dc:creator>
      <dc:date>2022-12-25T19:32:06Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage based on specific row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentage-based-on-specific-row/m-p/2988011#M100396</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="419200" data-lia-user-login="angsoka" class="lia-mention lia-mention-user"&gt;angsoka&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How will you select ALL-ALL in the Country slicer and expect the table to show Indonesia and Thailand?&lt;/P&gt;
&lt;P&gt;If you select ALL-ALL, the table will show ALL-ALL. You'll need to change the structure of your table&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE style="height: 100px; width: 100%; border-collapse: collapse; border-style: groove; border-color: #0c1c49; background-color: #00675f;" border="0" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15px;"&gt;
&lt;TD width="15.961305925030231%" style="width: 92px; height: 15px;"&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="84.03869407496977%" style="width: 485px; height: 15px; text-align: left;"&gt;&lt;FONT color="#FFFFFF"&gt;&lt;SPAN&gt;&lt;STRONG&gt;Please accept the solution when done and consider &lt;FONT color="#FF9900"&gt;giving a thumbs up if posts are helpful.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT color="#FFFFFF"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt; &lt;/FONT&gt;&lt;BR /&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT size="4.5" color="#FF99CC"&gt;Contact me privately for support with any larger-scale BI needs, tutoring, etc.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 25 Dec 2022 20:38:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentage-based-on-specific-row/m-p/2988011#M100396</guid>
      <dc:creator>AlB</dc:creator>
      <dc:date>2022-12-25T20:38:17Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage based on specific row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentage-based-on-specific-row/m-p/2988219#M100414</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="92178" data-lia-user-login="AlB" class="lia-mention lia-mention-user"&gt;AlB&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;In the full dataset, the column "COUNTRY" will only contain the country's name. Which then "ALL-ALL" will be just the total of every country. In that case, we don't need "ALL-ALL", "ALL-ASIA", "ALL-EUROPE".&lt;BR /&gt;However, it will make the size of the database will be very huge given that the commodity is at least 300 products.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Here, the filter Country : ALL-ALL will only dictate the denominator.&amp;nbsp;&lt;BR /&gt;ALL-ALL &amp;gt;&amp;gt; divide by 200&lt;BR /&gt;ALL-ASIA &amp;gt;&amp;gt; divide by 80&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;While the filter "Status - State", will limit the name of the country and not "ALL-ALL", "ALL-ASIA", etc.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;angsoka&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Dec 2022 03:47:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentage-based-on-specific-row/m-p/2988219#M100414</guid>
      <dc:creator>angsoka</dc:creator>
      <dc:date>2022-12-26T03:47:49Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage based on specific row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentage-based-on-specific-row/m-p/2991320#M100661</link>
      <description>&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;HI&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="419200" data-lia-user-login="angsoka" class="lia-mention lia-mention-user"&gt;angsoka&lt;/a&gt;,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;I'd like to suggest you take a look at the following links to know the hierarchy level and use selectedvalue and switch function to achieve dynamic calculations based on current value:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;&lt;A href="https://www.sqlbi.com/articles/clever-hierarchy-handling-in-dax/" target="_blank"&gt;Clever Hierarchy Handling in DAX - SQLBI&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;&lt;A href="https://www.pbiusergroup.com/communities/community-home/digestviewer/viewthread?MessageKey=b52f0351-c430-43d2-8665-9bee835416c7&amp;amp;CommunityKey=3a98540b-3655-4795-b8cb-30dbeb93ba78&amp;amp;tab=digestviewer" target="_blank"&gt;My Favorite DAX Feature: SELECTEDVALUE with SWITCH | Winston-Salem Power BI User Group (pbiusergroup.com)&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Regards,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Xiaoxin Sheng&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Dec 2022 08:08:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentage-based-on-specific-row/m-p/2991320#M100661</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-12-28T08:08:29Z</dc:date>
    </item>
  </channel>
</rss>

