<?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: Calculate difference % with all values in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-difference-with-all-values/m-p/2442343#M65448</link>
    <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="237748" data-lia-user-login="jereaallikko" class="lia-mention lia-mention-user"&gt;jereaallikko&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just as tamerj1 said, you need create a new table with all IDs and don’t create any relationship between these two tables. Then, take the ID column in the new table to create a Slicer.&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;P&gt;But after that, you need create a Measure like this.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Difference =
VAR SelectedID =
    SELECTEDVALUE ( 'NewTable'[ID] )
VAR SelectedNumber =
    CALCULATE ( MAX ( 'Table'[Number] ), 'Table'[ID] = SelectedID )
RETURN
    DIVIDE ( MAX ( 'Table'[Number] ) - SelectedNumber, SelectedNumber )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then the result will look like this.&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;P&gt;If this post helps, then please consider&lt;STRONG&gt; Accept it as the solution&lt;/STRONG&gt; to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let me know. Thanks a lot!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Community Support Team _ Caiyun&lt;/P&gt;</description>
    <pubDate>Thu, 07 Apr 2022 06:21:54 GMT</pubDate>
    <dc:creator>v-cazheng-msft</dc:creator>
    <dc:date>2022-04-07T06:21:54Z</dc:date>
    <item>
      <title>Calculate difference % with all values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-difference-with-all-values/m-p/2435037#M64953</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am facing a problem with calculating % difference. In a nuthsell, I would like to visualize the difference of X and ALL Values in a table separately. An example data and use case below:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Ideally, I am looking for a solution (DAX or something else) to calculate the "Number" difference % between &lt;STRONG&gt;20943_0003&lt;/STRONG&gt; and the rest of the values &lt;STRONG&gt;separately&lt;/STRONG&gt;. Similarly, difference % between &lt;STRONG&gt;29839_0002&lt;/STRONG&gt; and the rest of the values &lt;STRONG&gt;separately, &lt;/STRONG&gt;then&lt;STRONG&gt; 29853_0001&amp;nbsp;&lt;/STRONG&gt;and so on..&lt;/P&gt;&lt;P&gt;The idea is that the user can choose and filter&amp;nbsp;&lt;STRONG&gt;ANY ID&lt;/STRONG&gt;&amp;nbsp;and see the % difference to every ID Number.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The result what I am looking for is this:&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;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or this:&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;And same for every &lt;STRONG&gt;Number&lt;/STRONG&gt; of each &lt;STRONG&gt;ID&lt;/STRONG&gt;. A bit difficult to explain, but hopefully you get the idea.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this even possible to do? Anyt tips?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Br,&lt;/P&gt;&lt;P&gt;Jere&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2022 08:58:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-difference-with-all-values/m-p/2435037#M64953</guid>
      <dc:creator>jereaallikko</dc:creator>
      <dc:date>2022-04-04T08:58:50Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate difference % with all values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-difference-with-all-values/m-p/2435121#M64956</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="237748" data-lia-user-login="jereaallikko" class="lia-mention lia-mention-user"&gt;jereaallikko&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you can start with creating simple disconnected Slicer Table. &amp;gt; New Table:&lt;/P&gt;&lt;LI-CODE lang="php"&gt;Slicer Table =
VALUES ( Table[ID] )&lt;/LI-CODE&gt;&lt;P&gt;Then create your difference measure&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="php"&gt;Difference =
VAR SelectedID =
    SELECTEDVALUE ( 'Slicer Table'[ID] )
VAR CurrentID =
    SELECTEDVALUE ( Table[ID] )
RETURN
    IF (
        COUNTROWS ( ALLSELECTED ( 'Slicer Table'[ID] ) ) = 1,
        DIVIDE ( CurrentID - SelectedID, CurrentID )
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2022 09:25:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-difference-with-all-values/m-p/2435121#M64956</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-04-04T09:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate difference % with all values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-difference-with-all-values/m-p/2442343#M65448</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="237748" data-lia-user-login="jereaallikko" class="lia-mention lia-mention-user"&gt;jereaallikko&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just as tamerj1 said, you need create a new table with all IDs and don’t create any relationship between these two tables. Then, take the ID column in the new table to create a Slicer.&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;P&gt;But after that, you need create a Measure like this.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Difference =
VAR SelectedID =
    SELECTEDVALUE ( 'NewTable'[ID] )
VAR SelectedNumber =
    CALCULATE ( MAX ( 'Table'[Number] ), 'Table'[ID] = SelectedID )
RETURN
    DIVIDE ( MAX ( 'Table'[Number] ) - SelectedNumber, SelectedNumber )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then the result will look like this.&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;P&gt;If this post helps, then please consider&lt;STRONG&gt; Accept it as the solution&lt;/STRONG&gt; to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let me know. Thanks a lot!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Community Support Team _ Caiyun&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2022 06:21:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-difference-with-all-values/m-p/2442343#M65448</guid>
      <dc:creator>v-cazheng-msft</dc:creator>
      <dc:date>2022-04-07T06:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate difference % with all values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-difference-with-all-values/m-p/2443941#M65531</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="277465" data-lia-user-login="v-cazheng-msft" class="lia-mention lia-mention-user"&gt;v-cazheng-msft&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;This worked out perfectly. Thanks a lot!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Br,&lt;/P&gt;&lt;P&gt;Jere&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2022 15:36:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-difference-with-all-values/m-p/2443941#M65531</guid>
      <dc:creator>jereaallikko</dc:creator>
      <dc:date>2022-04-07T15:36:23Z</dc:date>
    </item>
  </channel>
</rss>

