<?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: Issue with measures in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Issue-with-measures/m-p/3374239#M127047</link>
    <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;- Please check this out, let me know if this works. If this fix your problem, please tick this a solution and a thumps up.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Total Sales (Latest Year) = 
VAR CurrentYear = MAX('Sale'[Date].[Year])
RETURN
CALCULATE(
    SUM('Sale'[SalesAmount]), 
    FILTER('Sale', YEAR('Sale'[Date]) = CurrentYear)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've hypothetically established this DAX measure, but without much clarity regarding your datasets. If this doesn't serve your needs, I recommend you share a sample dataset. This will give me a more comprehensive understanding of your data structure, enabling me to devise a more suitable solution.&lt;/P&gt;</description>
    <pubDate>Thu, 10 Aug 2023 12:59:39 GMT</pubDate>
    <dc:creator>Manoj_Nair</dc:creator>
    <dc:date>2023-08-10T12:59:39Z</dc:date>
    <item>
      <title>Issue with measures</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Issue-with-measures/m-p/3374063#M127032</link>
      <description>&lt;P&gt;Hi i am new to Power BI&amp;nbsp;&lt;BR /&gt;Total Sales (Latest Year) = CALCULATE( SUM(Sale[SalesAmount]), FILTER('Sale', 'Sale'[Date].[Year] = [Latest Year]) ) i have this measure which is suppose to calculate sales for latest year(2022 in this case) but its calculating for all years.I tried&amp;nbsp; instead of latest year i put 2022 and it displayed the sales for 2022.But i check the value of latest year and it returns 2022 so why doesnt it work.&amp;nbsp;&lt;BR /&gt;this my latest year measure&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Latest Year = &lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Sale&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;[Year]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 10 Aug 2023 11:36:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Issue-with-measures/m-p/3374063#M127032</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-08-10T11:36:36Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with measures</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Issue-with-measures/m-p/3374105#M127040</link>
      <description>&lt;P&gt;Hi Wallet Masster,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can use below DAX&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Total Sales = CALCULATE(SUM(Sales([SalesAmount]),FILTER(YEAR(TODAY())-1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know if this works&lt;/P&gt;</description>
      <pubDate>Thu, 10 Aug 2023 12:00:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Issue-with-measures/m-p/3374105#M127040</guid>
      <dc:creator>rsureshkumar98</dc:creator>
      <dc:date>2023-08-10T12:00:27Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with measures</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Issue-with-measures/m-p/3374239#M127047</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;- Please check this out, let me know if this works. If this fix your problem, please tick this a solution and a thumps up.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Total Sales (Latest Year) = 
VAR CurrentYear = MAX('Sale'[Date].[Year])
RETURN
CALCULATE(
    SUM('Sale'[SalesAmount]), 
    FILTER('Sale', YEAR('Sale'[Date]) = CurrentYear)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've hypothetically established this DAX measure, but without much clarity regarding your datasets. If this doesn't serve your needs, I recommend you share a sample dataset. This will give me a more comprehensive understanding of your data structure, enabling me to devise a more suitable solution.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Aug 2023 12:59:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Issue-with-measures/m-p/3374239#M127047</guid>
      <dc:creator>Manoj_Nair</dc:creator>
      <dc:date>2023-08-10T12:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with measures</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Issue-with-measures/m-p/3374261#M127050</link>
      <description>&lt;P&gt;Thanks it works, can i ask you another question its about filtering&lt;/P&gt;</description>
      <pubDate>Thu, 10 Aug 2023 13:09:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Issue-with-measures/m-p/3374261#M127050</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-08-10T13:09:52Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with measures</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Issue-with-measures/m-p/3374268#M127051</link>
      <description>&lt;P&gt;This works too thanks&lt;/P&gt;</description>
      <pubDate>Thu, 10 Aug 2023 13:10:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Issue-with-measures/m-p/3374268#M127051</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-08-10T13:10:57Z</dc:date>
    </item>
  </channel>
</rss>

