<?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: Using 2 Slicers to Calculate/Display Variance in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Using-2-Slicers-to-Calculate-Display-Variance/m-p/2517860#M36130</link>
    <description>&lt;P&gt;I've added a link to the dataset:&amp;nbsp;&lt;A href="https://www.dropbox.com/s/n3rzu68aolp8azo/05.16%20Forum%20Question.pbix?dl=0" target="_blank"&gt;https://www.dropbox.com/s/n3rzu68aolp8azo/05.16%20Forum%20Question.pbix?dl=0&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 16 May 2022 14:27:59 GMT</pubDate>
    <dc:creator>CoreyLearnsBI</dc:creator>
    <dc:date>2022-05-16T14:27:59Z</dc:date>
    <item>
      <title>Using 2 Slicers to Calculate/Display Variance</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Using-2-Slicers-to-Calculate-Display-Variance/m-p/2510762#M36063</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a single visual where I would like users to be able to select two months via two&amp;nbsp;separate slicers in order&amp;nbsp;to calculate the difference in performance for each group's performance for the two months selected. See screenshot below.&lt;/P&gt;&lt;P&gt;For example, Group number 1 has values&amp;nbsp;of&amp;nbsp;1.94 for May and 1.44 for April.&amp;nbsp;&amp;nbsp;I want the math of 1.94 - 1.44 = 0.54 to be calculated. I would like the difference of 0.54 to be&amp;nbsp;shown on the visual instead of the 1.94&amp;nbsp;for the first group.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data can be found here:&amp;nbsp;&lt;A href="https://www.dropbox.com/s/n3rzu68aolp8azo/05.16%20Forum%20Question.pbix?dl=0" target="_blank" rel="noopener"&gt;https://www.dropbox.com/s/n3rzu68aolp8azo/05.16%20Forum%20Question.pbix?dl=0&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The desired outcome is two slicers affecting one visual where a user can pick two months to see the variance among groups.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CoreyLearnsBI_0-1652711459790.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/715758i3244BBE536CB2FA6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CoreyLearnsBI_0-1652711459790.png" alt="CoreyLearnsBI_0-1652711459790.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can this be done? How can this be done? I am a fairly new Power BI user, so I might need a more elaborate explanation/demonstration. I plan on using the visual for all 12 calendar months, but with only 2 slicers to enable users to see the variance between 2 months of data.&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;I tried something like this, but it sums all the groups' data together. I need each group's variance to be displayed individually on the visual, instead of one summation.&lt;/P&gt;&lt;PRE&gt;sumtable1 = CALCULATE(SUM(Table1[take]),ALLSELECTED(Table1[Month1]))&lt;/PRE&gt;&lt;PRE&gt;sumTable2 = CALCULATE(SUM(Table2[Take]),ALLSELECTED(Table2[Month2]))&lt;/PRE&gt;&lt;PRE&gt;look up the values = [sumtable1]-[sumTable2]&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="Monthly Variance (From Two Slicers).PNG" style="width: 729px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/713699i561D288D2E9278CD/image-size/large?v=v2&amp;amp;px=999" role="button" title="Monthly Variance (From Two Slicers).PNG" alt="Monthly Variance (From Two Slicers).PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 May 2022 14:31:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Using-2-Slicers-to-Calculate-Display-Variance/m-p/2510762#M36063</guid>
      <dc:creator>CoreyLearnsBI</dc:creator>
      <dc:date>2022-05-16T14:31:13Z</dc:date>
    </item>
    <item>
      <title>Re: Using 2 Slicers to Calculate/Display Variance</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Using-2-Slicers-to-Calculate-Display-Variance/m-p/2515302#M36103</link>
      <description>&lt;P&gt;As long as you use disconnected tables for your slicers and measures for your result this will be straightforward.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please provide sanitized sample data that fully covers your issue. If you paste the data into a table in your post or use one of the file services it will be easier to assist you. Avoid posting screenshots of your source data if possible.&lt;BR /&gt;&lt;BR /&gt;Please show the expected outcome based on the sample data you provided. Screenshots of the expected outcome are ok.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523" target="_blank"&gt;https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 14 May 2022 19:46:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Using-2-Slicers-to-Calculate-Display-Variance/m-p/2515302#M36103</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2022-05-14T19:46:39Z</dc:date>
    </item>
    <item>
      <title>Re: Using 2 Slicers to Calculate/Display Variance</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Using-2-Slicers-to-Calculate-Display-Variance/m-p/2517860#M36130</link>
      <description>&lt;P&gt;I've added a link to the dataset:&amp;nbsp;&lt;A href="https://www.dropbox.com/s/n3rzu68aolp8azo/05.16%20Forum%20Question.pbix?dl=0" target="_blank"&gt;https://www.dropbox.com/s/n3rzu68aolp8azo/05.16%20Forum%20Question.pbix?dl=0&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 May 2022 14:27:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Using-2-Slicers-to-Calculate-Display-Variance/m-p/2517860#M36130</guid>
      <dc:creator>CoreyLearnsBI</dc:creator>
      <dc:date>2022-05-16T14:27:59Z</dc:date>
    </item>
    <item>
      <title>Re: Using 2 Slicers to Calculate/Display Variance</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Using-2-Slicers-to-Calculate-Display-Variance/m-p/2519608#M36140</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/350706"&gt;@CoreyLearnsBI&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I download your pbix file and check it. I think you create two slicers by same [Month/Year] column. We couldn't get two different values from one column. It is better for you to create an unrelated&amp;nbsp;Month/Year table for slicer2.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Month/Year = 
VALUES('Data for SQL (MY22)'[Month/Year])&lt;/LI-CODE&gt;
&lt;P&gt;Then create a measure to achieve your goal.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Display Variance = 
VAR _sumtable1 =
    CALCULATE ( SUM ( 'Data for SQL (MY22)'[Metric 1] ) )
VAR _selectmonth =
    SELECTEDVALUE ( 'Month/Year'[Month/Year] )
VAR _sumtable2 =
    CALCULATE (
        SUM ( 'Data for SQL (MY22)'[Metric 1] ),
        FILTER (
            ALLEXCEPT (
                'Data for SQL (MY22)',
                'Data for SQL (MY22)'[Group],
                'Data for SQL (MY22)'[Market]
            ),
            'Data for SQL (MY22)'[Month/Year] = _selectmonth
        )
    )
RETURN
    _sumtable1 - _sumtable2&lt;/LI-CODE&gt;
&lt;P&gt;Result is as below.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RicoZhou_0-1652771892085.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/716277i99E4D504E66E0419/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RicoZhou_0-1652771892085.png" alt="RicoZhou_0-1652771892085.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2022 07:18:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Using-2-Slicers-to-Calculate-Display-Variance/m-p/2519608#M36140</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-17T07:18:43Z</dc:date>
    </item>
    <item>
      <title>Re: Using 2 Slicers to Calculate/Display Variance</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Using-2-Slicers-to-Calculate-Display-Variance/m-p/2526880#M36204</link>
      <description>&lt;P&gt;Hey Rico,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for taking the time to walk through this example with me!&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you mind me asking if there is a textbook/course you recommend for mastering DAX?&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 14:25:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Using-2-Slicers-to-Calculate-Display-Variance/m-p/2526880#M36204</guid>
      <dc:creator>CoreyLearnsBI</dc:creator>
      <dc:date>2022-05-19T14:25:27Z</dc:date>
    </item>
  </channel>
</rss>

