<?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 between multiple columns and then highlighting the difference in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-difference-between-multiple-columns-and-then/m-p/3792014#M148181</link>
    <description>&lt;P&gt;Thank you! Can this formula work in a Matrix?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 26 Mar 2024 17:22:08 GMT</pubDate>
    <dc:creator>Sk1_2</dc:creator>
    <dc:date>2024-03-26T17:22:08Z</dc:date>
    <item>
      <title>Calculate difference between multiple columns and then highlighting the difference</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-difference-between-multiple-columns-and-then/m-p/3786577#M147899</link>
      <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Hello I am trying to calculate the difference between mutiple columns in PowerBI. And Highlight changes above and below 50 w/ color. I haven't been able to find any examples with multiple columns.&amp;nbsp; I believe I have to create a measure but I'm not sure what calcualtions to use. Any help would be much appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2024 15:48:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-difference-between-multiple-columns-and-then/m-p/3786577#M147899</guid>
      <dc:creator>Sk1_2</dc:creator>
      <dc:date>2024-03-22T15:48:49Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate difference between multiple columns and then highlighting the difference</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-difference-between-multiple-columns-and-then/m-p/3786860#M147911</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;if you want the differences between two columns, you can do this : measure = SUM(Sum of 1) - SUM(SUM of 2).. etc&lt;BR /&gt;if you want the differences in % to do a highlight when the differences is &amp;gt; than 50%, you should do something like this, and use the pourcentage as a "cell elements" :&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Pourcentage =&lt;/SPAN&gt; &lt;SPAN&gt;DIVIDE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Table (2)'&lt;/SPAN&gt;&lt;SPAN&gt;[Value 2]&lt;/SPAN&gt;&lt;SPAN&gt;) - &lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Table (2)'&lt;/SPAN&gt;&lt;SPAN&gt;[Value 1]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Table (2)'&lt;/SPAN&gt;&lt;SPAN&gt;[Value 1]&lt;/SPAN&gt;&lt;SPAN&gt;) )&lt;BR /&gt;&lt;BR /&gt;If your columns are something like a date, or months, you should think about do a pivot to get thoses columns in rows. And then use DAX date functions to compare thoses dates.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 22 Mar 2024 18:36:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-difference-between-multiple-columns-and-then/m-p/3786860#M147911</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-03-22T18:36:30Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate difference between multiple columns and then highlighting the difference</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-difference-between-multiple-columns-and-then/m-p/3790569#M148116</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi all&amp;nbsp;,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;, thanks for your concern about this case, I have some additions for problem solving.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="710530" data-lia-user-login="Sk1_2" class="lia-mention lia-mention-user"&gt;Sk1_2&lt;/a&gt;&amp;nbsp;, &lt;/SPAN&gt;&lt;SPAN&gt;thank you for giving a specific description of the problem. Based on your description, I will give you the following steps to solve the problem.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;1.The test table &lt;STRONG&gt;Table&lt;/STRONG&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2.New Measures and input the DAX code of calculating difference for individual columns.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Difference between Sum of 1 and Sum of 2 = SUM('Table'[Sum of 1])-SUM('Table'[Sum of 2])&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Difference between Sum of 1 and Sum of 3 = SUM('Table'[Sum of 1])-SUM('Table'[Sum of 3])&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Difference between Sum of 1 and Sum of 4 = SUM('Table'[Sum of 1])-SUM('Table'[Sum of 4])&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Difference between Sum of 2 and Sum of 3 = SUM('Table'[Sum of 2])-SUM('Table'[Sum of 3])&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Difference between Sum of 2 and Sum of 4 = SUM('Table'[Sum of 2])-SUM('Table'[Sum of 4])&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;3.Add these measures to columns.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;4.Conditional formatting. Refer to &lt;A href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Flearn.microsoft.com%2Fen-us%2Fpower-bi%2Fcreate-reports%2Fdesktop-conditional-table-formatting&amp;amp;data=05%7C02%7Cv-yanimei%40microsoft.com%7Ce9af82e1a56a4949c79708dc4d45ce72%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638470209426645799%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&amp;amp;sdata=OU0bspQJ1hk2SzyBj%2BtFbRxmeuL5pzdnW4EtJw%2BC5%2Bw%3D&amp;amp;reserved=0" target="_blank"&gt;Apply conditional table formatting in Power BI - Power BI | Microsoft Learn&lt;/A&gt;. All measures follow the steps:&lt;/P&gt;
&lt;P&gt;a.Click the drop-down arrow, select &lt;STRONG&gt;Conditional formatting&lt;/STRONG&gt; &amp;gt; &lt;STRONG&gt;Background color.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;b.Select &lt;STRONG&gt;Rules&lt;/STRONG&gt; as Format style.&lt;/P&gt;
&lt;P&gt;c.Select &lt;STRONG&gt;Number&lt;/STRONG&gt; or &lt;STRONG&gt;Percentage&lt;/STRONG&gt; as value type.&lt;/P&gt;
&lt;P&gt;d.Select the color you want to display.&lt;/P&gt;
&lt;P&gt;You can modify them according to your needs.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;5.The outcome is in the following picture.&lt;/SPAN&gt;&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;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Caroline Mei&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If this post &lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Mar 2024 05:08:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-difference-between-multiple-columns-and-then/m-p/3790569#M148116</guid>
      <dc:creator>v-yanimei-msft</dc:creator>
      <dc:date>2024-03-26T05:08:52Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate difference between multiple columns and then highlighting the difference</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-difference-between-multiple-columns-and-then/m-p/3792014#M148181</link>
      <description>&lt;P&gt;Thank you! Can this formula work in a Matrix?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Mar 2024 17:22:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-difference-between-multiple-columns-and-then/m-p/3792014#M148181</guid>
      <dc:creator>Sk1_2</dc:creator>
      <dc:date>2024-03-26T17:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate difference between multiple columns and then highlighting the difference</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-difference-between-multiple-columns-and-then/m-p/3792622#M148210</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="710530" data-lia-user-login="Sk1_2" class="lia-mention lia-mention-user"&gt;Sk1_2&lt;/a&gt;&amp;nbsp;, &lt;/SPAN&gt;&lt;SPAN&gt;you can realize it in a Matrix. Now, I will show you how to realize it in a Matrix.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;1.Modify the test table &lt;STRONG&gt;Table&lt;/STRONG&gt;.&lt;/SPAN&gt; Add a column &lt;STRONG&gt;ValueType&lt;/STRONG&gt;, so that you can use it as the row later.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2.Add &lt;STRONG&gt;ValueType&lt;/STRONG&gt; to Rows, and add &lt;STRONG&gt;Sum of 1, Sum of 2, Sum of 3, Sum of 4, Difference between Sum of 1 and Sum of 2, …&lt;/STRONG&gt; to Values.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;3.The outcome is in the following picture.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;SUP&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;/SUP&gt;&lt;/P&gt;
&lt;P&gt;&lt;SUP&gt;&lt;SPAN&gt;Caroline Mei&lt;/SPAN&gt;&lt;/SUP&gt;&lt;/P&gt;
&lt;P&gt;&lt;SUP&gt;&lt;SPAN&gt;If this post &lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/SUP&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2024 02:13:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-difference-between-multiple-columns-and-then/m-p/3792622#M148210</guid>
      <dc:creator>v-yanimei-msft</dc:creator>
      <dc:date>2024-03-27T02:13:59Z</dc:date>
    </item>
  </channel>
</rss>

