<?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: Make a Column using DAX that fetches value for only first date of month in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-a-Column-using-DAX-that-fetches-value-for-only-first-date/m-p/2512307#M69722</link>
    <description>&lt;P&gt;Hi， &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="371583" data-lia-user-login="tintinsherlock" class="lia-mention lia-mention-user"&gt;tintinsherlock&lt;/a&gt;&amp;nbsp;；&lt;/P&gt;
&lt;P&gt;You could create a measure.&lt;/P&gt;
&lt;LI-CODE lang="java"&gt;First Value = 
VAR _startMonth = STARTOFMONTH('Table'[Date])
RETURN CALCULATE(SUM([Value]),FILTER(ALL('Table'),[Date]=_startMonth&amp;amp;&amp;amp;[Type]="A"))&lt;/LI-CODE&gt;
&lt;P&gt;The final shown :&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Community Support Team _ Yalan Wu&lt;BR /&gt;If this post &lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
    <pubDate>Fri, 13 May 2022 06:15:20 GMT</pubDate>
    <dc:creator>v-yalanwu-msft</dc:creator>
    <dc:date>2022-05-13T06:15:20Z</dc:date>
    <item>
      <title>Make a Column using DAX that fetches value for only first date of month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-a-Column-using-DAX-that-fetches-value-for-only-first-date/m-p/2504730#M69321</link>
      <description>&lt;P&gt;Hi everyone,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Sorry if the title is not very clear, so I'll try to detail the ask/request in detail here.&amp;nbsp;&lt;BR /&gt;I have a dataset/table "HelloWorld" that looks like below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Date&lt;/TD&gt;&lt;TD&gt;Type&lt;/TD&gt;&lt;TD&gt;Value&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2022-04-01&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2022-04-01&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;50&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2022-04-01&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;30&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2022-04-01&lt;/TD&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;2022-04-02&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2022-04-02&lt;/TD&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2022-05-01&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;200&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2022-05-01&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2022-05-01&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;50&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2022-05-01&lt;/TD&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want a calculated column which will be fed to a card, and a Date filter/slicer drop-down visual will be connected to that. I want the calculated column to show -&lt;BR /&gt;For any selected date of the month, the output value should be SUM of all Value for 1st of that month where Type = A.&lt;BR /&gt;&lt;BR /&gt;So if the Date is selected as 2022-04-01, the Value shown on the card should be 150 (100 + 50 for two Type = A entries of 2022-04-01).&amp;nbsp;&lt;BR /&gt;If the date is 2022-04-01 (or any date in 2022-04) the value should still be 150.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the Date selected is now changed 2022-05-01, the value shown on the card should be 300 (200 + 100 for two Type = A entries of 2022-05-01), and same for any date selected in 2022-05. And so on.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I tried the following piece of code, which gave me erroneous result -&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR startMonth = STARTOFMONTH(HelloWorld[Date])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN CALCULATE(SUM(HelloWorld[Value]), FILTER (HelloWorld,HelloWorld[Date] == startMonth),FILTER (HelloWorld, HelloWorld[Type] == "A"))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;BR /&gt;Any help will be hugely appreciated. Thanks in advance.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 10 May 2022 12:06:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-a-Column-using-DAX-that-fetches-value-for-only-first-date/m-p/2504730#M69321</guid>
      <dc:creator>tintinsherlock</dc:creator>
      <dc:date>2022-05-10T12:06:44Z</dc:date>
    </item>
    <item>
      <title>Re: Make a Column using DAX that fetches value for only first date of month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-a-Column-using-DAX-that-fetches-value-for-only-first-date/m-p/2504772#M69323</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;You could add a calculated column to Table.&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;First Month Value = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Table'[Value]&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;'Table'[Type]&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;EARLIER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Table'[Type]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;ALLEXCEPT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Table'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;'Table'[Date]&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;If you set date slicer to first of month the answer should be ok. I hope this helps!&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 10 May 2022 12:26:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-a-Column-using-DAX-that-fetches-value-for-only-first-date/m-p/2504772#M69323</guid>
      <dc:creator>Whitewater100</dc:creator>
      <dc:date>2022-05-10T12:26:30Z</dc:date>
    </item>
    <item>
      <title>Re: Make a Column using DAX that fetches value for only first date of month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-a-Column-using-DAX-that-fetches-value-for-only-first-date/m-p/2504781#M69325</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="179903" data-lia-user-login="Whitewater100" class="lia-mention lia-mention-user"&gt;Whitewater100&lt;/a&gt;&amp;nbsp;That's the thing. I want the value of the all the days of the month to be the same as the first of the month.&amp;nbsp;&lt;BR /&gt;So 150 should be the value for all days of 2022-04 and 300 for 2022-05 and so on.&amp;nbsp;&lt;BR /&gt;So even if someone selects the other day on the slicer, they see this same value.&amp;nbsp;&lt;BR /&gt;(Context - this value represents a monthly count so no it should show this value no matter what date)&amp;nbsp;&lt;BR /&gt;Is there any other solution you can suggest?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2022 12:30:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-a-Column-using-DAX-that-fetches-value-for-only-first-date/m-p/2504781#M69325</guid>
      <dc:creator>tintinsherlock</dc:creator>
      <dc:date>2022-05-10T12:30:54Z</dc:date>
    </item>
    <item>
      <title>Re: Make a Column using DAX that fetches value for only first date of month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-a-Column-using-DAX-that-fetches-value-for-only-first-date/m-p/2504969#M69337</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;Can you check this out? Please see page 2. (I combine replies sometimes)&lt;/P&gt;&lt;P&gt;&lt;A title="Fill Down" href="https://drive.google.com/file/d/1ZAjWFdUWn39_GSDDYaxck8oLgzPNd1-_/view?usp=sharing" target="_self"&gt;https://drive.google.com/file/d/1ZAjWFdUWn39_GSDDYaxck8oLgzPNd1-_/view?usp=sharing&lt;/A&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, 10 May 2022 13:20:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-a-Column-using-DAX-that-fetches-value-for-only-first-date/m-p/2504969#M69337</guid>
      <dc:creator>Whitewater100</dc:creator>
      <dc:date>2022-05-10T13:20:47Z</dc:date>
    </item>
    <item>
      <title>Re: Make a Column using DAX that fetches value for only first date of month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-a-Column-using-DAX-that-fetches-value-for-only-first-date/m-p/2512307#M69722</link>
      <description>&lt;P&gt;Hi， &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="371583" data-lia-user-login="tintinsherlock" class="lia-mention lia-mention-user"&gt;tintinsherlock&lt;/a&gt;&amp;nbsp;；&lt;/P&gt;
&lt;P&gt;You could create a measure.&lt;/P&gt;
&lt;LI-CODE lang="java"&gt;First Value = 
VAR _startMonth = STARTOFMONTH('Table'[Date])
RETURN CALCULATE(SUM([Value]),FILTER(ALL('Table'),[Date]=_startMonth&amp;amp;&amp;amp;[Type]="A"))&lt;/LI-CODE&gt;
&lt;P&gt;The final shown :&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Community Support Team _ Yalan Wu&lt;BR /&gt;If this post &lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Fri, 13 May 2022 06:15:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-a-Column-using-DAX-that-fetches-value-for-only-first-date/m-p/2512307#M69722</guid>
      <dc:creator>v-yalanwu-msft</dc:creator>
      <dc:date>2022-05-13T06:15:20Z</dc:date>
    </item>
    <item>
      <title>Re: Make a Column using DAX that fetches value for only first date of month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-a-Column-using-DAX-that-fetches-value-for-only-first-date/m-p/2513389#M69775</link>
      <description>&lt;P&gt;Exactly what I needed. Thank you so much!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 May 2022 11:39:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-a-Column-using-DAX-that-fetches-value-for-only-first-date/m-p/2513389#M69775</guid>
      <dc:creator>tintinsherlock</dc:creator>
      <dc:date>2022-05-13T11:39:59Z</dc:date>
    </item>
  </channel>
</rss>

