<?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: Get Days of the week from number 1 to 7 in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-Days-of-the-week-from-number-1-to-7/m-p/2630013#M76901</link>
    <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="397630" data-lia-user-login="driplytics" class="lia-mention lia-mention-user"&gt;driplytics&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As&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; mentioned before, you can use switch like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Weekday =
SWITCH (
    [DayOfWeek],
    1, "Monday",
    2, "Tuesday",
    3, "Wedensday",
    4, "Thursday",
    5, "Friday",
    6, "Saturday",
    7, "Sunday"
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Output:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, you can create a new table like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Table =
SELECTCOLUMNS (
    CALENDAR ( TODAY (), TODAY () + 6 ),
    "Weekday", FORMAT ( [Date], "dddd" ),
    "DayOfWeek", WEEKDAY ( [Date], 2 )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Output:&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;Best Regards,&lt;/P&gt;&lt;P&gt;Jianbo Li&lt;/P&gt;&lt;P&gt;If this post &lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
    <pubDate>Mon, 11 Jul 2022 07:10:42 GMT</pubDate>
    <dc:creator>v-jianboli-msft</dc:creator>
    <dc:date>2022-07-11T07:10:42Z</dc:date>
    <item>
      <title>Get Days of the week from number 1 to 7</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-Days-of-the-week-from-number-1-to-7/m-p/2622814#M76478</link>
      <description>&lt;P&gt;My dataset has no date column, but contains &lt;STRONG&gt;Dayofweek&lt;/STRONG&gt;&amp;nbsp; from Number 1 to 7.&lt;/P&gt;&lt;P&gt;I want to Create a Column that Returns Monday to Friday instead.&lt;/P&gt;&lt;P&gt;&amp;nbsp;I had to use IF then Function (like shown in the image below) to get this. But i Know there is a better and more efficient way to get this using a simple Dax formula.&lt;/P&gt;&lt;P&gt;Probably, takes the Number like 1 and Return Monday in a column. i would appreciate if i could get your suggestions&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2022 14:20:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-Days-of-the-week-from-number-1-to-7/m-p/2622814#M76478</guid>
      <dc:creator>driplytics</dc:creator>
      <dc:date>2022-07-06T14:20:24Z</dc:date>
    </item>
    <item>
      <title>Re: Get Days of the week from number 1 to 7</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-Days-of-the-week-from-number-1-to-7/m-p/2622877#M76483</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="397630" data-lia-user-login="driplytics" class="lia-mention lia-mention-user"&gt;driplytics&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can use SWITCH function&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2022 14:44:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-Days-of-the-week-from-number-1-to-7/m-p/2622877#M76483</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-07-06T14:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: Get Days of the week from number 1 to 7</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-Days-of-the-week-from-number-1-to-7/m-p/2630013#M76901</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="397630" data-lia-user-login="driplytics" class="lia-mention lia-mention-user"&gt;driplytics&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As&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; mentioned before, you can use switch like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Weekday =
SWITCH (
    [DayOfWeek],
    1, "Monday",
    2, "Tuesday",
    3, "Wedensday",
    4, "Thursday",
    5, "Friday",
    6, "Saturday",
    7, "Sunday"
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Output:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, you can create a new table like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Table =
SELECTCOLUMNS (
    CALENDAR ( TODAY (), TODAY () + 6 ),
    "Weekday", FORMAT ( [Date], "dddd" ),
    "DayOfWeek", WEEKDAY ( [Date], 2 )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Output:&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;Best Regards,&lt;/P&gt;&lt;P&gt;Jianbo Li&lt;/P&gt;&lt;P&gt;If this post &lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jul 2022 07:10:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-Days-of-the-week-from-number-1-to-7/m-p/2630013#M76901</guid>
      <dc:creator>v-jianboli-msft</dc:creator>
      <dc:date>2022-07-11T07:10:42Z</dc:date>
    </item>
  </channel>
</rss>

