<?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: Caclulate function over riding filter? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Caclulate-function-over-riding-filter/m-p/4755920#M182102</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1303194" data-lia-user-login="fallingfirst" class="lia-mention lia-mention-user"&gt;fallingfirst&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for reaching out to the Microsoft Fabric Forum Community.&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;BR /&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="608865" data-lia-user-login="DataNinja777" class="lia-mention lia-mention-user"&gt;DataNinja777&lt;/a&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1287762" data-lia-user-login="FBergamaschi" class="lia-mention lia-mention-user"&gt;FBergamaschi&lt;/a&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="903292" data-lia-user-login="MasonMA" class="lia-mention lia-mention-user"&gt;MasonMA&lt;/a&gt;&amp;nbsp;Thank you for inputs.&lt;BR /&gt;As they suggested, please try the steps above as they can be helpful. If the issue still persists, feel free to reach out to the community for further assistance.&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Tue, 08 Jul 2025 03:46:25 GMT</pubDate>
    <dc:creator>v-priyankata</dc:creator>
    <dc:date>2025-07-08T03:46:25Z</dc:date>
    <item>
      <title>Caclulate function over riding filter?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Caclulate-function-over-riding-filter/m-p/4753856#M182019</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Measure&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;S&amp;amp;OP FY25 = CALCULATE([CY Act Vol May + S&amp;amp;OP Jun],'Date'[FY]="FY25")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My data consist of FY25 and FY26 data. The above measure will filter it to only FY25 data. However, when I slice this data by month (e.g. May). I end up getting May YTD instead of just May month results. How can I fix this?&lt;/P&gt;</description>
      <pubDate>Sat, 05 Jul 2025 15:26:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Caclulate-function-over-riding-filter/m-p/4753856#M182019</guid>
      <dc:creator>fallingfirst</dc:creator>
      <dc:date>2025-07-05T15:26:46Z</dc:date>
    </item>
    <item>
      <title>Re: Caclulate function over riding filter?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Caclulate-function-over-riding-filter/m-p/4753866#M182021</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;CALCULATE will surely override any filters on the column&amp;nbsp;&lt;SPAN&gt;'Date'[FY]. To understand your issue, though, I need some images of how you are grouping columns in the visual (eg what the filter context consists in), the code of the measure inside the CALCULATE call and your data model.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Some pasted data would help further so I can import in Power BI and reproduce the issue and find the solution.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Best, FB&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 05 Jul 2025 16:16:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Caclulate-function-over-riding-filter/m-p/4753866#M182021</guid>
      <dc:creator>FBergamaschi</dc:creator>
      <dc:date>2025-07-05T16:16:01Z</dc:date>
    </item>
    <item>
      <title>Re: Caclulate function over riding filter?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Caclulate-function-over-riding-filter/m-p/4753867#M182022</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1303194" data-lia-user-login="fallingfirst" class="lia-mention lia-mention-user"&gt;fallingfirst&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The issue you're encountering, where slicing by a month results in a year-to-date (YTD) value, typically stems from the logic within your base measure, [CY Act Vol May + S&amp;amp;OP Jun]. This measure likely uses a time-intelligence function that calculates a cumulative total, which overrides the simple month filter from your slicer. To resolve this, you must modify your primary DAX formula to force it to respect the slicer's context.&lt;/P&gt;
&lt;P&gt;You can correct this by adding the VALUES function to your existing formula. This explicitly reapplies the month selection as a filter, ensuring the calculation is constrained to just that period.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;S&amp;amp;OP FY25 = 
CALCULATE(
    [CY Act Vol May + S&amp;amp;OP Jun],
    'Date'[FY] = "FY25",
    VALUES('Date'[Month])
)&lt;/LI-CODE&gt;
&lt;P&gt;In this revised measure, VALUES('Date'[Month]) captures the month selected in your slicer and uses it as a direct filter in the CALCULATE function. This powerful addition overrides any internal YTD calculations within your base measure, giving you the specific monthly value you need.&lt;/P&gt;
&lt;P&gt;While the above code provides an immediate fix, it's worth noting that the name of your base measure, [CY Act Vol May + S&amp;amp;OP Jun], suggests it may be hard-coded and inflexible. For a more robust and scalable solution, it is better practice to create a dynamic base measure that can distinguish between actual and forecast data based on the date context.&lt;/P&gt;
&lt;P&gt;For example, you could create a new base measure that automatically selects the correct data type.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;S&amp;amp;OP Volume (Dynamic) = 
VAR SelectedDate = MAX('Date'[Date])
-- Define the cut-off date for actuals
VAR LastActualsDate = DATE(2025, 5, 31)
RETURN
IF(
    SelectedDate &amp;lt;= LastActualsDate,
    [Actual Volume],
    [S&amp;amp;OP Volume]
)&lt;/LI-CODE&gt;
&lt;P&gt;Using this dynamic measure simplifies your final calculation considerably, making it cleaner and easier to maintain. This approach will work correctly across any month without requiring additional overrides.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;S&amp;amp;OP FY25 = 
CALCULATE(
    [S&amp;amp;OP Volume (Dynamic)],
    'Date'[FY] = "FY25"
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;</description>
      <pubDate>Sat, 05 Jul 2025 16:12:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Caclulate-function-over-riding-filter/m-p/4753867#M182022</guid>
      <dc:creator>DataNinja777</dc:creator>
      <dc:date>2025-07-05T16:12:10Z</dc:date>
    </item>
    <item>
      <title>Re: Caclulate function over riding filter?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Caclulate-function-over-riding-filter/m-p/4753925#M182023</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1303194" data-lia-user-login="fallingfirst" class="lia-mention lia-mention-user"&gt;fallingfirst&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Could you share how [CY Act Vol May + S&amp;amp;OP Jun] is defined? It’d help to know if it already has built-in logic for month or year-to-date — that could affect how filters like 'Date'[FY] = "FY25" or a month slicer interact with it.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Also, unless you have to use YTD for certain visuals,&amp;nbsp;simplifying the base measure to avoid embedded time intelligence functions is generally a better long-term solution.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;A measure like below to prevent unwanted context transition.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;S&amp;amp;OP FY25 =&lt;BR /&gt;CALCULATE(&lt;BR /&gt;[SimplyAggregation],&lt;BR /&gt;'Date'[FY] = "FY25",&lt;BR /&gt;KEEPFILTERS('Date'[Month]) // Preserves the month selection&lt;BR /&gt;)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 05 Jul 2025 22:05:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Caclulate-function-over-riding-filter/m-p/4753925#M182023</guid>
      <dc:creator>MasonMA</dc:creator>
      <dc:date>2025-07-05T22:05:10Z</dc:date>
    </item>
    <item>
      <title>Re: Caclulate function over riding filter?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Caclulate-function-over-riding-filter/m-p/4755920#M182102</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1303194" data-lia-user-login="fallingfirst" class="lia-mention lia-mention-user"&gt;fallingfirst&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for reaching out to the Microsoft Fabric Forum Community.&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;BR /&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="608865" data-lia-user-login="DataNinja777" class="lia-mention lia-mention-user"&gt;DataNinja777&lt;/a&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1287762" data-lia-user-login="FBergamaschi" class="lia-mention lia-mention-user"&gt;FBergamaschi&lt;/a&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="903292" data-lia-user-login="MasonMA" class="lia-mention lia-mention-user"&gt;MasonMA&lt;/a&gt;&amp;nbsp;Thank you for inputs.&lt;BR /&gt;As they suggested, please try the steps above as they can be helpful. If the issue still persists, feel free to reach out to the community for further assistance.&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jul 2025 03:46:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Caclulate-function-over-riding-filter/m-p/4755920#M182102</guid>
      <dc:creator>v-priyankata</dc:creator>
      <dc:date>2025-07-08T03:46:25Z</dc:date>
    </item>
    <item>
      <title>Re: Caclulate function over riding filter?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Caclulate-function-over-riding-filter/m-p/4758413#M182213</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1303194" data-lia-user-login="fallingfirst" class="lia-mention lia-mention-user"&gt;fallingfirst&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wanted to check if you had the opportunity to review the information provided by users. Please feel free to contact us if you have any further questions.&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jul 2025 05:51:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Caclulate-function-over-riding-filter/m-p/4758413#M182213</guid>
      <dc:creator>v-priyankata</dc:creator>
      <dc:date>2025-07-10T05:51:36Z</dc:date>
    </item>
    <item>
      <title>Re: Caclulate function over riding filter?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Caclulate-function-over-riding-filter/m-p/4761840#M182353</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1303194" data-lia-user-login="fallingfirst" class="lia-mention lia-mention-user"&gt;fallingfirst&lt;/a&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Hope everything’s going smoothly on your end. We haven’t heard back from you, so I wanted to check if the issue got sorted&amp;nbsp; If yes, marking the relevant&amp;nbsp;solution would be awesome for others who might run into the same thing.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jul 2025 10:02:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Caclulate-function-over-riding-filter/m-p/4761840#M182353</guid>
      <dc:creator>v-priyankata</dc:creator>
      <dc:date>2025-07-14T10:02:40Z</dc:date>
    </item>
  </channel>
</rss>

