<?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: Measures to returning correct value in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measures-to-returning-correct-value/m-p/4749102#M181856</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Thank you very much, after days of research, debugging, and your simple "Keep Filters" finally solved my headache.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 01 Jul 2025 03:56:28 GMT</pubDate>
    <dc:creator>Dex98powerbi</dc:creator>
    <dc:date>2025-07-01T03:56:28Z</dc:date>
    <item>
      <title>Measures to returning correct value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measures-to-returning-correct-value/m-p/4749040#M181853</link>
      <description>&lt;P&gt;I have a sales table that consist [date,sales amount] There is sales date from 2024 and 2025&lt;BR /&gt;I have date table that consist [date, year, month, day, week, weekyear(custom column to show year does the week belongs to example date 31st December 2024 , week year is 2025 because it is week1 of 2025). The table consist date from 2019 to 2025&lt;BR /&gt;&lt;BR /&gt;everything is working correctly including the custom column weekyear. Until if i place my measures with weekyear, it is not returning the correct thing. It starts showing year 2019 to 2025 even if I do not have any sales data from 2019 to 2023.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Below are my measures&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;total_sales_all_session = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;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sp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;'date'&lt;/SPAN&gt;&lt;SPAN&gt;[week_year]&lt;/SPAN&gt; &lt;SPAN&gt;IN&lt;/SPAN&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;SPAN&gt;2024&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;2025&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;total_normalise_sales_all =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;[total_sales_all_session]&lt;/SPAN&gt;&lt;SPAN&gt;/&lt;/SPAN&gt;&lt;SPAN&gt;[draws_all_session]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;if i am using year and week in the visuals, logically are correct, because it did not include year from 2019 to 2023. When i use week with the custom week year, it will start display values from 2019 to 2025.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I tried my custom column with the data directly from the sales table, it works fine. Just problem with my measures&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jul 2025 02:56:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measures-to-returning-correct-value/m-p/4749040#M181853</guid>
      <dc:creator>Dex98powerbi</dc:creator>
      <dc:date>2025-07-01T02:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: Measures to returning correct value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measures-to-returning-correct-value/m-p/4749083#M181854</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am not sure if I understood your question correctly, but please try using KEEPFILTERS DAX function in the measures that you wrote.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://learn.microsoft.com/en-us/dax/keepfilters-function-dax?wt.mc_id=DP-MVP-5004989" target="_blank"&gt;KEEPFILTERS function (DAX) - DAX | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jul 2025 03:35:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measures-to-returning-correct-value/m-p/4749083#M181854</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2025-07-01T03:35:17Z</dc:date>
    </item>
    <item>
      <title>Re: Measures to returning correct value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measures-to-returning-correct-value/m-p/4749102#M181856</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Thank you very much, after days of research, debugging, and your simple "Keep Filters" finally solved my headache.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jul 2025 03:56:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measures-to-returning-correct-value/m-p/4749102#M181856</guid>
      <dc:creator>Dex98powerbi</dc:creator>
      <dc:date>2025-07-01T03:56:28Z</dc:date>
    </item>
  </channel>
</rss>

