<?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: How to Adjust Service Measures Based on Date Range in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Adjust-Service-Measures-Based-on-Date-Range/m-p/4235733#M167534</link>
    <description>&lt;P&gt;It worked perfectly, this was the result I was looking for, thank you very much.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":flexed_biceps:"&gt;💪&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":handshake:"&gt;🤝&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 09 Oct 2024 20:16:36 GMT</pubDate>
    <dc:creator>alanvicsansz</dc:creator>
    <dc:date>2024-10-09T20:16:36Z</dc:date>
    <item>
      <title>How to Adjust Service Measures Based on Date Range</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Adjust-Service-Measures-Based-on-Date-Range/m-p/4232856#M167403</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Hello everyone, good evening! I hope you are all doing well.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I would like to share the challenge I am currently facing regarding the performance measures of the customer service team.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Context of the Challenge&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Currently, I have three measures that need adjustment:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;STRONG&gt;Current Year&lt;/STRONG&gt;: Represents the number of calls handled in the current year filter.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Previous Year&lt;/STRONG&gt;: Represents the number of calls handled in the previous year filter.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Total Accumulated&lt;/STRONG&gt;: This is the sum of the current year and previous year measures.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Objective&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The main objective is to ensure that these measures display values only when the specified date period is met.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Rules for Each Measure:&lt;/STRONG&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;STRONG&gt;Current Year&lt;/STRONG&gt;:&lt;UL&gt;&lt;LI&gt;If the maximum filtered date is, for example, &lt;STRONG&gt;January 31, 2023&lt;/STRONG&gt;, the displayed value should only be for &lt;STRONG&gt;January 2023&lt;/STRONG&gt;.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Previous Year&lt;/STRONG&gt;:&lt;UL&gt;&lt;LI&gt;If the minimum filtered date is &lt;STRONG&gt;January 1, 2022&lt;/STRONG&gt;, and the maximum date is &lt;STRONG&gt;January 31, 2023&lt;/STRONG&gt;, all months should display values, restricting to indicate only the calls from the year &lt;STRONG&gt;2022&lt;/STRONG&gt;.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Total Accumulated&lt;/STRONG&gt;:&lt;UL&gt;&lt;LI&gt;This measure will be the sum of the calls recorded in the &lt;STRONG&gt;current year&lt;/STRONG&gt; and &lt;STRONG&gt;previous year&lt;/STRONG&gt; measures.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Final Considerations&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;It is essential that the implementation of these rules ensures that the displayed values are consistent with the defined date range. If anyone has suggestions or ideas on how to approach this issue, I would appreciate any help. &lt;span class="lia-unicode-emoji" title=":flexed_biceps:"&gt;💪&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Photo:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Download link -&amp;gt;&lt;/STRONG&gt;&amp;nbsp;&lt;A href="https://drive.google.com/file/d/1y5UF5XUC2raQ6KJ_H4JBDHhkw9136ZeE/view?usp=sharing" target="_blank" rel="noopener"&gt;Base de testes.pbix - Google Drive&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Oct 2024 04:52:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Adjust-Service-Measures-Based-on-Date-Range/m-p/4232856#M167403</guid>
      <dc:creator>alanvicsansz</dc:creator>
      <dc:date>2024-10-08T04:52:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to Adjust Service Measures Based on Date Range</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Adjust-Service-Measures-Based-on-Date-Range/m-p/4233117#M167418</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="809707" data-lia-user-login="alanvicsansz" class="lia-mention lia-mention-user"&gt;alanvicsansz&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To clarify your question further:&lt;/P&gt;&lt;P&gt;For the current year value, you seek the total values for the entire month corresponding to the latest selected date. For instance, if the latest selected date is February 22, 2023, the current year value would be the "sum of values for February 2023." I hope I have understood the logic for calculating the "Current Year" correctly.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Regarding the previous year, I did not fully grasp your requirements. Could you please rephrase and provide some examples to aid my understanding of the issue?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Additionally, it would be helpful if you could provide a snapshot of the "Expected Answer" or data to accompany the explanation of the "Previous Year" calculation logic.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Udit&lt;/P&gt;</description>
      <pubDate>Tue, 08 Oct 2024 07:54:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Adjust-Service-Measures-Based-on-Date-Range/m-p/4233117#M167418</guid>
      <dc:creator>quantumudit</dc:creator>
      <dc:date>2024-10-08T07:54:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to Adjust Service Measures Based on Date Range</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Adjust-Service-Measures-Based-on-Date-Range/m-p/4234159#M167461</link>
      <description>&lt;P&gt;Let me know if the screenshot helps. If you need more details, feel free to ask and I'll be happy to provide more info!&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Oct 2024 21:17:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Adjust-Service-Measures-Based-on-Date-Range/m-p/4234159#M167461</guid>
      <dc:creator>alanvicsansz</dc:creator>
      <dc:date>2024-10-08T21:17:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to Adjust Service Measures Based on Date Range</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Adjust-Service-Measures-Based-on-Date-Range/m-p/4234931#M167482</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="809707" data-lia-user-login="alanvicsansz" class="lia-mention lia-mention-user"&gt;alanvicsansz&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've made a test for your reference:&lt;/P&gt;
&lt;P&gt;1\Add two caculate column for&amp;nbsp;&lt;SPAN&gt;Ocorrencias&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Year = YEAR(Ocorrencias[data_ocorrencia])&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Month = MONTH(Ocorrencias[data_ocorrencia])&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;2\Set these two measure&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Ano atual = 
VAR MaxYear=YEAR(CALCULATE(MAX(Ocorrencias[data_ocorrencia]),ALLSELECTED(Ocorrencias)))
Var MaxMonth= MONTH(CALCULATE(MAX(Ocorrencias[data_ocorrencia]),ALLSELECTED(Ocorrencias)))
RETURN
CALCULATE(COUNTROWS(ALLSELECTED(Ocorrencias)),Ocorrencias[Month]=SELECTEDVALUE(Calendario[MesNum]) &amp;amp;&amp;amp; MaxYear=Ocorrencias[Year] &amp;amp;&amp;amp; Ocorrencias[Month]&amp;lt;=MaxMonth )&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Ano anterior = 
VAR MaxYear=YEAR(CALCULATE(MAX(Ocorrencias[data_ocorrencia]),ALLSELECTED(Ocorrencias)))-1
Var MaxMonth= MONTH(CALCULATE(MAX(Ocorrencias[data_ocorrencia]),ALLSELECTED(Ocorrencias)))
RETURN
CALCULATE(COUNTROWS(ALLSELECTED(Ocorrencias)),Ocorrencias[Month]=SELECTEDVALUE(Calendario[MesNum]) &amp;amp;&amp;amp; MaxYear=Ocorrencias[Year])&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Bof&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2024 08:53:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Adjust-Service-Measures-Based-on-Date-Range/m-p/4234931#M167482</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-10-09T08:53:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to Adjust Service Measures Based on Date Range</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Adjust-Service-Measures-Based-on-Date-Range/m-p/4235733#M167534</link>
      <description>&lt;P&gt;It worked perfectly, this was the result I was looking for, thank you very much.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":flexed_biceps:"&gt;💪&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":handshake:"&gt;🤝&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2024 20:16:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Adjust-Service-Measures-Based-on-Date-Range/m-p/4235733#M167534</guid>
      <dc:creator>alanvicsansz</dc:creator>
      <dc:date>2024-10-09T20:16:36Z</dc:date>
    </item>
  </channel>
</rss>

