<?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 need in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-need/m-p/2215651#M52439</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="329393" data-lia-user-login="Nihed" class="lia-mention lia-mention-user"&gt;Nihed&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can try following code&amp;nbsp; to manually create a calendar table to replace data in &lt;SPAN&gt;EXCEL file.&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Calendar date = CALENDAR(DATE(2017,01,01),TODAY()) //calculated table&lt;/LI-CODE&gt;
&lt;P&gt;calculated columns:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Quarter = FORMAT('Calendar date'[Date],"YYYYQ")&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Num quarter = 
VAR _year =
    YEAR ( TODAY () )
VAR _quarter =
    QUARTER ( TODAY () )
VAR _last_quarter =
    IF ( _quarter = 1, _year - 1 &amp;amp; "4", _year &amp;amp; _quarter - 1 )
RETURN
    IF (
        'Calendar date'[New quarter] = _last_quarter,
        "last quarter",
        'Calendar date'[New quarter]
    )&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Due to the use of calculated table, you still need to refresh the calendar table to get the latest data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Community Support Team _ Eason&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 01 Dec 2021 08:16:35 GMT</pubDate>
    <dc:creator>v-easonf-msft</dc:creator>
    <dc:date>2021-12-01T08:16:35Z</dc:date>
    <item>
      <title>Dax need</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-need/m-p/2209276#M52086</link>
      <description>&lt;P&gt;You will see that there is a quarter selection on dashboard:&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This selection comes from an excel file, however it is not great because users sometimes forget to update this excel file.&lt;/P&gt;&lt;P&gt;Instead of that, can we create a table which is dynamically filled with quarters and replace that excel selection?&lt;/P&gt;&lt;P&gt;New table should include quarters from last 5 years until current quarter.&lt;/P&gt;&lt;P&gt;The dashboard should always select current quarter automatically.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;how can I please do this&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Nov 2021 10:33:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-need/m-p/2209276#M52086</guid>
      <dc:creator>Nihed</dc:creator>
      <dc:date>2021-11-26T10:33:54Z</dc:date>
    </item>
    <item>
      <title>Re: Dax need</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-need/m-p/2209387#M52091</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="329393" data-lia-user-login="Nihed" class="lia-mention lia-mention-user"&gt;Nihed&lt;/a&gt; , You need to create column like this in your date table and save that in This Qtr&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Switch( True() ,&lt;/P&gt;
&lt;P&gt;format(today(), "YYYY - \QQ") = [Qtr Year] , "This Qtr",&lt;/P&gt;
&lt;P&gt;[Qtr Year]&lt;/P&gt;
&lt;P&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Default Date Today/ This Month / This Year: &lt;A href="https://www.youtube.com/watch?v=hfn05preQYA" target="_blank"&gt;https://www.youtube.com/watch?v=hfn05preQYA&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Nov 2021 11:42:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-need/m-p/2209387#M52091</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2021-11-26T11:42:40Z</dc:date>
    </item>
    <item>
      <title>Re: Dax need</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-need/m-p/2209418#M52094</link>
      <description>&lt;P&gt;&lt;SPAN class="ng-star-inserted"&gt;thank you for your answer&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="ng-star-inserted"&gt;just for information I don’t have a date table in my report I use an EXCEL file with this data and I wanted to create this data in a direct dynamic table to have&amp;nbsp; "QUARTER SELECTION " in Power BI how I can do please?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="ng-star-inserted"&gt;&lt;SPAN&gt;the data of the execel file:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Nov 2021 11:52:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-need/m-p/2209418#M52094</guid>
      <dc:creator>Nihed</dc:creator>
      <dc:date>2021-11-26T11:52:50Z</dc:date>
    </item>
    <item>
      <title>Re: Dax need</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-need/m-p/2215651#M52439</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="329393" data-lia-user-login="Nihed" class="lia-mention lia-mention-user"&gt;Nihed&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can try following code&amp;nbsp; to manually create a calendar table to replace data in &lt;SPAN&gt;EXCEL file.&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Calendar date = CALENDAR(DATE(2017,01,01),TODAY()) //calculated table&lt;/LI-CODE&gt;
&lt;P&gt;calculated columns:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Quarter = FORMAT('Calendar date'[Date],"YYYYQ")&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Num quarter = 
VAR _year =
    YEAR ( TODAY () )
VAR _quarter =
    QUARTER ( TODAY () )
VAR _last_quarter =
    IF ( _quarter = 1, _year - 1 &amp;amp; "4", _year &amp;amp; _quarter - 1 )
RETURN
    IF (
        'Calendar date'[New quarter] = _last_quarter,
        "last quarter",
        'Calendar date'[New quarter]
    )&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Due to the use of calculated table, you still need to refresh the calendar table to get the latest data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Community Support Team _ Eason&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Dec 2021 08:16:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-need/m-p/2215651#M52439</guid>
      <dc:creator>v-easonf-msft</dc:creator>
      <dc:date>2021-12-01T08:16:35Z</dc:date>
    </item>
    <item>
      <title>Re: Dax need</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-need/m-p/2216913#M52502</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;It works very well I did exactly the same thing, thank you very much for your help&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Dec 2021 22:38:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-need/m-p/2216913#M52502</guid>
      <dc:creator>Nihed</dc:creator>
      <dc:date>2021-12-01T22:38:01Z</dc:date>
    </item>
  </channel>
</rss>

