<?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: calculate by MTD just giving blank output in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-by-MTD-just-giving-blank-output/m-p/3263465#M120740</link>
    <description>&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I have created new date tables several time and had a couple of hours with chat GPT several different forulas keep giving teh same blank out put on the card visuals.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas would be appreciated&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thansk&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;</description>
    <pubDate>Thu, 01 Jun 2023 08:48:44 GMT</pubDate>
    <dc:creator>plawrence14</dc:creator>
    <dc:date>2023-06-01T08:48:44Z</dc:date>
    <item>
      <title>calculate by MTD just giving blank output</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-by-MTD-just-giving-blank-output/m-p/3261815#M120669</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am very new to Power BI so please forgive me for any ignorance. I did search for a solution but the solutions I found did not seem to work for me.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have an Invoice table with lots of different columns on. One being 'invoice value' and one being 'dateCreated'.&lt;/P&gt;&lt;P&gt;I created my own Date table with Dates and offsets. Within is a column called 'dates' with every date from 2015 to 2030.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I linked the two tables by the 'dateCreated' and 'date' columns. I have tried this one-to-many, many-to-one, and many-to-many.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If i do&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;invValue = CALCULATE(sum(Invoice[InvoiceValue]))&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I get the value of all invoice for all time so I know that works.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Now I would like to get last month's so I have tried writing different measures. The first:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;invoiceValueMTD = SUMX(FILTER(Dates, Dates[MonthOffset]=-1),Invoice[Total Invoice Value])&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;and the second:&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;invoiceValueMTD = CALCULATE(SUM(Invoice[InvoiceValue]),DATESMTD(Dates[Date]))&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Both give blank outputs on the card&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could anyone help please?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2023 12:36:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-by-MTD-just-giving-blank-output/m-p/3261815#M120669</guid>
      <dc:creator>plawrence14</dc:creator>
      <dc:date>2023-05-31T12:36:07Z</dc:date>
    </item>
    <item>
      <title>Re: calculate by MTD just giving blank output</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-by-MTD-just-giving-blank-output/m-p/3261914#M120676</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="535159" data-lia-user-login="plawrence14" class="lia-mention lia-mention-user"&gt;plawrence14&lt;/a&gt;&amp;nbsp;See if the techniques in this video help:&lt;/P&gt;
&lt;P&gt;&lt;div data-video-id="https://youtu.be/nUZPk7lpe_Q" data-video-remote-vid="https://youtu.be/nUZPk7lpe_Q" class="lia-video-container lia-media-is-center lia-media-size-medium"&gt;&lt;iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FnUZPk7lpe_Q%3Ffeature%3Doembed&amp;amp;display_name=YouTube&amp;amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DnUZPk7lpe_Q&amp;amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FnUZPk7lpe_Q%2Fhqdefault.jpg&amp;amp;type=text%2Fhtml&amp;amp;schema=youtube" allowfullscreen="" style="max-width: 100%"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;/P&gt;
&lt;P&gt;Also:&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/To-bleep-With-Time-Intelligence/ba-p/1260000" target="_blank"&gt;To **bleep** With Time Intelligence - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2023 12:53:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-by-MTD-just-giving-blank-output/m-p/3261914#M120676</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2023-05-31T12:53:27Z</dc:date>
    </item>
    <item>
      <title>Re: calculate by MTD just giving blank output</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-by-MTD-just-giving-blank-output/m-p/3262290#M120698</link>
      <description>&lt;P&gt;HI Greg,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think thats pointing me in the right direction, I shall make a new dates table and see where that goes&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks you I will update stommorow after i have played some more&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2023 15:50:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-by-MTD-just-giving-blank-output/m-p/3262290#M120698</guid>
      <dc:creator>plawrence14</dc:creator>
      <dc:date>2023-05-31T15:50:34Z</dc:date>
    </item>
    <item>
      <title>Re: calculate by MTD just giving blank output</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-by-MTD-just-giving-blank-output/m-p/3263465#M120740</link>
      <description>&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I have created new date tables several time and had a couple of hours with chat GPT several different forulas keep giving teh same blank out put on the card visuals.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas would be appreciated&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thansk&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2023 08:48:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-by-MTD-just-giving-blank-output/m-p/3263465#M120740</guid>
      <dc:creator>plawrence14</dc:creator>
      <dc:date>2023-06-01T08:48:44Z</dc:date>
    </item>
    <item>
      <title>Re: calculate by MTD just giving blank output</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-by-MTD-just-giving-blank-output/m-p/3263799#M120763</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So i have got this working, But the way i did it feels wrong still result is result&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So&amp;nbsp; i then added the following measures to the invoice table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CurrentDate = NOW()&lt;BR /&gt;CurrentDay = Day(NOW())&lt;BR /&gt;CurrentMonth = MONTH(NOW())&lt;BR /&gt;CurrentYear = YEAR(NOW())&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then i added these colums to the invoice table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Month = MONTH(invoice[DateCreated])&lt;BR /&gt;MonthName = FORMAT(invoice[DateCreated],"mmm")&lt;BR /&gt;Quarter = QUARTER(invoice[DateCreated])&lt;BR /&gt;Year = YEAR(invoice[DateCreated])&lt;/P&gt;&lt;P&gt;DayOffset = CONVERT(invoice[DateCreated]-TODAY(),INTEGER)&lt;BR /&gt;Week Offset = ROUNDUP((invoice[DateCreated]-TODAY ())/7,0)&lt;BR /&gt;MonthOffset = (invoice[YearOffset]*12) + (invoice[Month] - Invoice[CurrentMonth])&lt;BR /&gt;YearOffset = invocie[Year] - invoice[CurrentYear]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then i wrote my measure as&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;LastMonthTotalValue = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SUMX&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;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Invoice'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;Invoice&lt;/SPAN&gt;&lt;SPAN&gt;[MonthOffset]&lt;/SPAN&gt;&lt;SPAN&gt; = -&lt;/SPAN&gt;&lt;SPAN&gt;1&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;&lt;SPAN&gt;Invoice&lt;/SPAN&gt;&lt;SPAN&gt;[InvoiceValue]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;This worked and gave me the correct data but it really feels clumbersome as i may want dates for another table and would rather use a central date table&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Paul&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2023 12:17:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-by-MTD-just-giving-blank-output/m-p/3263799#M120763</guid>
      <dc:creator>plawrence14</dc:creator>
      <dc:date>2023-06-01T12:17:24Z</dc:date>
    </item>
  </channel>
</rss>

