<?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: Have calculate distinguish column values in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Have-calculate-distinguish-column-values/m-p/2982625#M100013</link>
    <description>&lt;P&gt;Ah, I missed that detail. Try this:&lt;/P&gt;
&lt;LI-CODE lang="php"&gt;Normalized Sales = 
DIVIDE (
    [Sales Amount],
    CALCULATE (
        [Sales Amount],
        REMOVEFILTERS ( 'Date'[Month Number] ),
        'Date'[Month] = "January"
    )
)&lt;/LI-CODE&gt;
&lt;P&gt;The removes the month name and month number filter context without removing the year filter context.&lt;/P&gt;</description>
    <pubDate>Wed, 21 Dec 2022 19:14:22 GMT</pubDate>
    <dc:creator>AlexisOlson</dc:creator>
    <dc:date>2022-12-21T19:14:22Z</dc:date>
    <item>
      <title>Have calculate distinguish column values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Have-calculate-distinguish-column-values/m-p/2982540#M100006</link>
      <description>&lt;P&gt;Hi everyone&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In one of my dashboards, I am attempting to create a graph that looks as follows:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;The idea is to compare the performance over the course of a year of multiple years.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To do that, I have set up the following visual:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;My current measure looks as follows:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Test Measure = 
var curr =
CALCULATE(
    sum('Table'[SalesTotalEUR]),
    KEEPFILTERS(
        'Table'[Date]
    )
)

var refer =
CALCULATE(
    sum('Table'[SalesTotalEUR]),
    FILTER(
        ALL('Date'[Date]),
        Month('Date'[Date])=1
    )
)

var div=
DIVIDE(
    curr,
    refer,
    ""
)

return div &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My problem is that I am unable to keep my measure restricted to the year column. Therefore, all my January values (be they from 2021 or from 2022) are being used in my calculations. Can anyone therefore please tell me how to set up my measure so that it distinguished between the column values?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2022 18:06:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Have-calculate-distinguish-column-values/m-p/2982540#M100006</guid>
      <dc:creator>ThomasSan</dc:creator>
      <dc:date>2022-12-21T18:06:01Z</dc:date>
    </item>
    <item>
      <title>Re: Have calculate distinguish column values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Have-calculate-distinguish-column-values/m-p/2982578#M100008</link>
      <description>&lt;P&gt;You shouldn't need a new measure to generate a chart like this. Put Month on the x-axis and Year in the Legend box like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2022 18:37:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Have-calculate-distinguish-column-values/m-p/2982578#M100008</guid>
      <dc:creator>AlexisOlson</dc:creator>
      <dc:date>2022-12-21T18:37:56Z</dc:date>
    </item>
    <item>
      <title>Re: Have calculate distinguish column values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Have-calculate-distinguish-column-values/m-p/2982614#M100012</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="39298" data-lia-user-login="AlexisOlson" class="lia-mention lia-mention-user"&gt;AlexisOlson&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for your reply. How would you set up your example to have your Sales Amount values normalized to 100 in January of every year? My goal is to show the relative change of my sales figures over the course of a year (e.g. sales grew by 10% in February 2021 (i.e. line goes to 110) while sales in February 2022 decreased by 6% (i.e. line goes to 94)). You can see what I mean in the graph above.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How would you approach this?&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2022 19:02:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Have-calculate-distinguish-column-values/m-p/2982614#M100012</guid>
      <dc:creator>ThomasSan</dc:creator>
      <dc:date>2022-12-21T19:02:11Z</dc:date>
    </item>
    <item>
      <title>Re: Have calculate distinguish column values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Have-calculate-distinguish-column-values/m-p/2982625#M100013</link>
      <description>&lt;P&gt;Ah, I missed that detail. Try this:&lt;/P&gt;
&lt;LI-CODE lang="php"&gt;Normalized Sales = 
DIVIDE (
    [Sales Amount],
    CALCULATE (
        [Sales Amount],
        REMOVEFILTERS ( 'Date'[Month Number] ),
        'Date'[Month] = "January"
    )
)&lt;/LI-CODE&gt;
&lt;P&gt;The removes the month name and month number filter context without removing the year filter context.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2022 19:14:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Have-calculate-distinguish-column-values/m-p/2982625#M100013</guid>
      <dc:creator>AlexisOlson</dc:creator>
      <dc:date>2022-12-21T19:14:22Z</dc:date>
    </item>
    <item>
      <title>Re: Have calculate distinguish column values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Have-calculate-distinguish-column-values/m-p/2983604#M100061</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="39298" data-lia-user-login="AlexisOlson" class="lia-mention lia-mention-user"&gt;AlexisOlson&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;unfortunately, this only fills out the January cells in my table&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I have slightly modified your command in order to fit my tables&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Test 3 = 
DIVIDE (
    sum('Table'[SalesTotalEUR]),
    CALCULATE (
        sum('Table'[SalesTotalEUR]),
        REMOVEFILTERS ( 'Date'[Month Number] ),
        'Date'[Date].[Month] = "January"
    ),
    ""
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea how to have the CALCULATE section of your solution expanded to all cells?&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2022 08:11:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Have-calculate-distinguish-column-values/m-p/2983604#M100061</guid>
      <dc:creator>ThomasSan</dc:creator>
      <dc:date>2022-12-22T08:11:27Z</dc:date>
    </item>
    <item>
      <title>Re: Have calculate distinguish column values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Have-calculate-distinguish-column-values/m-p/2984078#M100092</link>
      <description>&lt;P&gt;So, after some more researching and plenty of trials and errors, I was finally able to find the correct dax command for the problem It is as follows:&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;LI-CODE lang="markup"&gt;Test Measure = 

var yearselected=
SELECTEDVALUE('Date'[Date].[Year])

var curr =
sumx('Table', 'Table'[SalesTotalEUR])

var refer =
CALCULATE(
    sum('Table'[SalesTotalEUR]),
    FILTER(
        ALL('Date'[Date]),
        Month('Date'[Date])=1 &amp;amp;&amp;amp; year('Date'[Date])=yearselected
    )
)

var div=
DIVIDE(
    curr,
    refer,
    ""
)

return div&lt;/LI-CODE&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;As you can see, as SELECTEDVALUES that has to be brought in as a variable is needed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The resulting visual looks as desired:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2022 11:40:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Have-calculate-distinguish-column-values/m-p/2984078#M100092</guid>
      <dc:creator>ThomasSan</dc:creator>
      <dc:date>2022-12-22T11:40:34Z</dc:date>
    </item>
    <item>
      <title>Re: Have calculate distinguish column values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Have-calculate-distinguish-column-values/m-p/2985001#M100137</link>
      <description>&lt;P&gt;I'm guessing your model doesn't have exactly the same columns with the same names as the file I was testing with. Do you have columns for month name, month number, and year in your date table? If so, what are they? If not, then my solution clearly won't work since it's referencing non-existing things.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2022 18:30:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Have-calculate-distinguish-column-values/m-p/2985001#M100137</guid>
      <dc:creator>AlexisOlson</dc:creator>
      <dc:date>2022-12-22T18:30:41Z</dc:date>
    </item>
  </channel>
</rss>

