<?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: Measure calculation with Matrix (Dates) in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-calculation-with-Matrix-Dates/m-p/1759572#M36785</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;,For exemple:&lt;/P&gt;&lt;P&gt;I have created an column "DateFull" that gets where de piece current is situated&lt;img /&gt;:&lt;/P&gt;&lt;P&gt;And my matrix:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;And my Measure:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;As we can see, the result in January is getting 1, but the result expected is 5 because all 5 is situated in January.&lt;/P&gt;</description>
    <pubDate>Thu, 01 Apr 2021 09:54:02 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-04-01T09:54:02Z</dc:date>
    <item>
      <title>Measure calculation with Matrix (Dates)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-calculation-with-Matrix-Dates/m-p/1759450#M36776</link>
      <description>&lt;P&gt;I´m having troubles using measures in matriz, and i hope that someone can help me.&lt;/P&gt;&lt;P&gt;So my problem is the next:&lt;/P&gt;&lt;P&gt;I want to calculate the sum of all where the date = date of piece, being that the date is the line of the matriz. I have tried to calculate with the code:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Calculate(Sum(profit), Filter(table, table[dataPiece].[Year] = max(table[data].[Year] &amp;amp;&amp;amp; table[dataPiece].[Year] = max(table[data].[Month])))&lt;/LI-CODE&gt;&lt;P&gt;But the result ins´t getting right because some times the date ins´t the same that the date of piece.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Apr 2021 08:56:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-calculation-with-Matrix-Dates/m-p/1759450#M36776</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-04-01T08:56:31Z</dc:date>
    </item>
    <item>
      <title>Re: Measure calculation with Matrix (Dates)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-calculation-with-Matrix-Dates/m-p/1759499#M36778</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt; ,&amp;nbsp; Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you trying to get same month data everywhere&lt;/P&gt;
&lt;P&gt;The try&lt;/P&gt;
&lt;P&gt;Full month = CALCULATE(SUM(Table[Profit]),DATESMTD(ENDOFMONTH('Date'[Date])))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;month till date&lt;/P&gt;
&lt;P&gt;MTD = CALCULATE(SUM(Table[Profit]),DATESMTD('Date'[Date]))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :&lt;A href="https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions" target="_blank"&gt;radacad&lt;/A&gt; &lt;A href="https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/" target="_blank"&gt;sqlbi&lt;/A&gt; &lt;A href="https://www.youtube.com/playlist?list=PLPaNVDMhUXGYLz-w8ERQOo3KYARs7GgG-" target="_blank"&gt;My Video Series&lt;/A&gt; Appreciate your Kudos. &lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Apr 2021 09:06:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-calculation-with-Matrix-Dates/m-p/1759499#M36778</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2021-04-01T09:06:53Z</dc:date>
    </item>
    <item>
      <title>Re: Measure calculation with Matrix (Dates)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-calculation-with-Matrix-Dates/m-p/1759572#M36785</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;,For exemple:&lt;/P&gt;&lt;P&gt;I have created an column "DateFull" that gets where de piece current is situated&lt;img /&gt;:&lt;/P&gt;&lt;P&gt;And my matrix:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;And my Measure:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;As we can see, the result in January is getting 1, but the result expected is 5 because all 5 is situated in January.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Apr 2021 09:54:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-calculation-with-Matrix-Dates/m-p/1759572#M36785</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-04-01T09:54:02Z</dc:date>
    </item>
    <item>
      <title>Re: Measure calculation with Matrix (Dates)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-calculation-with-Matrix-Dates/m-p/1759864#M36793</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would strongly advise that you read &lt;A href="https://docs.microsoft.com/en-us/power-bi/guidance/star-schema" target="_self"&gt;this guide&lt;/A&gt; on how to create correct models in PBI before you start creating something at work. I can see you are using automatically generated date hierarchies in your table(s).&amp;nbsp;&lt;EM&gt;This is totally wrong&lt;/EM&gt;. You should never do it. Please create a dedicated date dimension table in the model. The guide will explain why you should not do that and have a dedicated date/time dimension.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Apr 2021 12:51:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-calculation-with-Matrix-Dates/m-p/1759864#M36793</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-04-01T12:51:41Z</dc:date>
    </item>
  </channel>
</rss>

