<?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: DAX Year to Date, Current Month, Matrix in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Year-to-Date-Current-Month-Matrix/m-p/2356658#M60048</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="333315" data-lia-user-login="spandy34" class="lia-mention lia-mention-user"&gt;spandy34&lt;/a&gt;&amp;nbsp;I think that you want to do is:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Current Month =
CALCULATE (
COUNTA ( 'Main Claim Data'[ClaimRef] ),
FILTER (
'Fin_Calendar',
'Fin_Calendar'[CalMonth] = SELECTEDVALUE ( 'Fin_Calendar'[CalMonth] )))&lt;/LI-CODE&gt;&lt;P&gt;Hope this answer solves your problem!&lt;BR /&gt;If you need any additional help please &lt;SPAN&gt;@&lt;/SPAN&gt; me in your reply.&lt;BR /&gt;If my reply provided you with a solution, please consider marking it as a solution &lt;span class="lia-unicode-emoji" title=":heavy_check_mark:"&gt;✔️&lt;/span&gt; or giving it a kudoe &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;BR /&gt;Thanks!&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.linkedin.com/in/gon%C3%A7alo-costa-b32253159" target="_blank"&gt;You can also check out my LinkedIn!&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Gonçalo Geraldes&lt;/P&gt;</description>
    <pubDate>Wed, 23 Feb 2022 16:15:07 GMT</pubDate>
    <dc:creator>goncalogeraldes</dc:creator>
    <dc:date>2022-02-23T16:15:07Z</dc:date>
    <item>
      <title>DAX Year to Date, Current Month, Matrix</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Year-to-Date-Current-Month-Matrix/m-p/2353649#M59844</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table where I have 3 measures as row headers but I would like to to have three coumns labelled , Current Month, Year to Date and Total which will filter the data.&amp;nbsp; Can anyone help with the coding as to how I can do this please&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="301004" data-lia-user-login="goncalogeraldes" class="lia-mention lia-mention-user"&gt;goncalogeraldes&lt;/a&gt;&amp;nbsp;- Thanks in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Feb 2022 14:37:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Year-to-Date-Current-Month-Matrix/m-p/2353649#M59844</guid>
      <dc:creator>spandy34</dc:creator>
      <dc:date>2022-02-22T14:37:32Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Year to Date, Current Month, Matrix</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Year-to-Date-Current-Month-Matrix/m-p/2353869#M59856</link>
      <description>&lt;P&gt;Hello there&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="333315" data-lia-user-login="spandy34" class="lia-mention lia-mention-user"&gt;spandy34&lt;/a&gt;&amp;nbsp;! I will assume that you want these values to be dynamic, thats is to say, that they depend on the selected date. So, for the current month, you can do one of the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Current Month =
/* This one has a "dynamic current month", so that the current month corresponds to your selection*/
CALCULATE (
    SUM ( 'Table'[Sales] ),
    FILTER (
        'DatesTable',
        'DatesTable'[Month] = SELECTEDVALUE ( 'DatesTable'[Month] )
    )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the Year to date, you can do:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Year to Date =
/* This measures uses the [Total sales] measure */
TOTALYTD ( [Total sales], 'DateTable'[DateKey] )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the total, just use a regular SUM:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Total sales = SUM('Table'[Sales])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this answer solves your problem!&lt;BR /&gt;If you need any additional help please &lt;SPAN&gt;@&lt;/SPAN&gt; me in your reply.&lt;BR /&gt;If my reply provided you with a solution, please consider marking it as a solution &lt;span class="lia-unicode-emoji" title=":heavy_check_mark:"&gt;✔️&lt;/span&gt; or giving it a kudoe &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;BR /&gt;Thanks!&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.linkedin.com/in/gon%C3%A7alo-costa-b32253159" target="_blank" rel="noopener"&gt;You can also check out my LinkedIn!&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Gonçalo Geraldes&lt;/P&gt;</description>
      <pubDate>Tue, 22 Feb 2022 15:56:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Year-to-Date-Current-Month-Matrix/m-p/2353869#M59856</guid>
      <dc:creator>goncalogeraldes</dc:creator>
      <dc:date>2022-02-22T15:56:59Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Year to Date, Current Month, Matrix</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Year-to-Date-Current-Month-Matrix/m-p/2354093#M59868</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="301004" data-lia-user-login="goncalogeraldes" class="lia-mention lia-mention-user"&gt;goncalogeraldes&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is what I have put in the measure&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Current Month = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE (&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SUM ( 'Main Claim Data'[ClaimRef] ),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;FILTER (&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;'Fin_Calendar',&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;'Fin_Calendar'[CalMonth] = SELECTEDVALUE ( 'Fin_Calendar'[CalMonth] )))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;and Year to Date&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Year to Date = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;--/* This measures uses the [Total sales] measure */&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;TOTALYTD ( [No of Claims], 'Fin_Calendar'[CalYear] )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Here are the relationships&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;and i get this error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Feb 2022 18:01:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Year-to-Date-Current-Month-Matrix/m-p/2354093#M59868</guid>
      <dc:creator>spandy34</dc:creator>
      <dc:date>2022-02-22T18:01:40Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Year to Date, Current Month, Matrix</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Year-to-Date-Current-Month-Matrix/m-p/2354127#M59872</link>
      <description>&lt;P&gt;You need to use a column of type DATE in all time intelligence calculations. I think in your case would be:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Year to Date =
TOTALYTD ( [No of Claims], 'Fin_Calendar'[DateId] --this is the field that needs to be of type date )&lt;/LI-CODE&gt;&lt;P&gt;Make sure that the field is formatted like so:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this answer solves your problem!&lt;BR /&gt;If you need any additional help please &lt;SPAN&gt;@&lt;/SPAN&gt; me in your reply.&lt;BR /&gt;If my reply provided you with a solution, please consider marking it as a solution &lt;span class="lia-unicode-emoji" title=":heavy_check_mark:"&gt;✔️&lt;/span&gt; or giving it a kudoe &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;BR /&gt;Thanks!&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.linkedin.com/in/gon%C3%A7alo-costa-b32253159" target="_blank"&gt;You can also check out my LinkedIn!&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Gonçalo Geraldes&lt;/P&gt;</description>
      <pubDate>Tue, 22 Feb 2022 18:19:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Year-to-Date-Current-Month-Matrix/m-p/2354127#M59872</guid>
      <dc:creator>goncalogeraldes</dc:creator>
      <dc:date>2022-02-22T18:19:29Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Year to Date, Current Month, Matrix</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Year-to-Date-Current-Month-Matrix/m-p/2354149#M59874</link>
      <description>&lt;P&gt;Thats great about the Year to Date but the Current Month is getting the following error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Here is the code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Current Month = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;--/* This one has a "dynamic current month", so that the current month corresponds to your selection*/&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE (&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SUM ( 'Main Claim Data'[ClaimRef] ),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;FILTER (&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;'Fin_Calendar',&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;'Fin_Calendar'[CalMonth] = SELECTEDVALUE ( 'Fin_Calendar'[CalMonth] )))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Feb 2022 18:38:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Year-to-Date-Current-Month-Matrix/m-p/2354149#M59874</guid>
      <dc:creator>spandy34</dc:creator>
      <dc:date>2022-02-22T18:38:46Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Year to Date, Current Month, Matrix</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Year-to-Date-Current-Month-Matrix/m-p/2356658#M60048</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="333315" data-lia-user-login="spandy34" class="lia-mention lia-mention-user"&gt;spandy34&lt;/a&gt;&amp;nbsp;I think that you want to do is:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Current Month =
CALCULATE (
COUNTA ( 'Main Claim Data'[ClaimRef] ),
FILTER (
'Fin_Calendar',
'Fin_Calendar'[CalMonth] = SELECTEDVALUE ( 'Fin_Calendar'[CalMonth] )))&lt;/LI-CODE&gt;&lt;P&gt;Hope this answer solves your problem!&lt;BR /&gt;If you need any additional help please &lt;SPAN&gt;@&lt;/SPAN&gt; me in your reply.&lt;BR /&gt;If my reply provided you with a solution, please consider marking it as a solution &lt;span class="lia-unicode-emoji" title=":heavy_check_mark:"&gt;✔️&lt;/span&gt; or giving it a kudoe &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;BR /&gt;Thanks!&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.linkedin.com/in/gon%C3%A7alo-costa-b32253159" target="_blank"&gt;You can also check out my LinkedIn!&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Gonçalo Geraldes&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 16:15:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Year-to-Date-Current-Month-Matrix/m-p/2356658#M60048</guid>
      <dc:creator>goncalogeraldes</dc:creator>
      <dc:date>2022-02-23T16:15:07Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Year to Date, Current Month, Matrix</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Year-to-Date-Current-Month-Matrix/m-p/2356761#M60058</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="301004" data-lia-user-login="goncalogeraldes" class="lia-mention lia-mention-user"&gt;goncalogeraldes&lt;/a&gt;&amp;nbsp;thank you for this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think I need this but with the ClassofBusiness = OT and Policy Code containing REC&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you think I am approaching this the correct way?&amp;nbsp; Should I be greating all these measure for the table below?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 16:46:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Year-to-Date-Current-Month-Matrix/m-p/2356761#M60058</guid>
      <dc:creator>spandy34</dc:creator>
      <dc:date>2022-02-23T16:46:16Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Year to Date, Current Month, Matrix</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Year-to-Date-Current-Month-Matrix/m-p/2356913#M60068</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="333315" data-lia-user-login="spandy34" class="lia-mention lia-mention-user"&gt;spandy34&lt;/a&gt;&amp;nbsp;You can use&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="51073" data-lia-user-login="MarkLaf" class="lia-mention lia-mention-user"&gt;MarkLaf&lt;/a&gt;&amp;nbsp;suggestion in the other post and adapt it to this case!&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 18:02:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Year-to-Date-Current-Month-Matrix/m-p/2356913#M60068</guid>
      <dc:creator>goncalogeraldes</dc:creator>
      <dc:date>2022-02-23T18:02:59Z</dc:date>
    </item>
  </channel>
</rss>

