<?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 Showing 5 weekdays data from the selected date in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Showing-5-weekdays-data-from-the-selected-date/m-p/2253241#M54343</link>
    <description>&lt;P&gt;I want to display the data of 5 working days( excluding weekends) from the selected date . For example if I select 16-12-2021 from the slicer it should show me 5 working days data including the selected date. Since 16th is Thursday it should show me data for 16th, 17th,20th, 21st and 22nd december data as 18 and 19 are weekends. Hope you understand my point.&lt;img /&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 23 Dec 2021 07:57:47 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-12-23T07:57:47Z</dc:date>
    <item>
      <title>Showing 5 weekdays data from the selected date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Showing-5-weekdays-data-from-the-selected-date/m-p/2253241#M54343</link>
      <description>&lt;P&gt;I want to display the data of 5 working days( excluding weekends) from the selected date . For example if I select 16-12-2021 from the slicer it should show me 5 working days data including the selected date. Since 16th is Thursday it should show me data for 16th, 17th,20th, 21st and 22nd december data as 18 and 19 are weekends. Hope you understand my point.&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Dec 2021 07:57:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Showing-5-weekdays-data-from-the-selected-date/m-p/2253241#M54343</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-12-23T07:57:47Z</dc:date>
    </item>
    <item>
      <title>Re: Showing 5 weekdays data from the selected date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Showing-5-weekdays-data-from-the-selected-date/m-p/2253300#M54345</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , refer to my blog, traveling across weekdays.&lt;/P&gt;
&lt;P&gt;Traveling Across Workdays - What is next/previous Working day&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/Travelling-Across-Workdays-Decoding-Date-and-Calendar-4-5-Power/ba-p/1187766" target="_blank" rel="noopener"&gt;https://community.powerbi.com/t5/Community-Blog/Travelling-Across-Workdays-Decoding-Date-and-Calendar-4-5-Power/ba-p/1187766&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But when you select a date and you need more than date you need an independent date table too&lt;/P&gt;
&lt;P&gt;Need of an Independent Date Table:&lt;A href="https://www.youtube.com/watch?v=44fGGmg9fHI" target="_blank" rel="noopener"&gt;https://www.youtube.com/watch?v=44fGGmg9fHI&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;example measure&lt;/P&gt;
&lt;P&gt;///Date1 is independent Date table, Date is joined with Table &lt;BR /&gt;new measure =&lt;BR /&gt;var _min = maxx(allselected(Date1),Date1[Work Date cont Rank])&lt;BR /&gt;var _max = _min +5 &lt;BR /&gt;return &lt;BR /&gt;calculate( sum(Table[Value]), filter('Date', 'Date'[Work Date cont Rank] &amp;gt;=_min &amp;amp;&amp;amp; 'Date'[Work Date cont Rank] &amp;lt;=_max))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;columns&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Work Day = if(WEEKDAY([Date],2)&amp;gt;=6,0,1)&lt;BR /&gt;Work Date = if(WEEKDAY([Date],2)&amp;gt;=6,BLANK(),[Date])&lt;BR /&gt;Work Date Cont = if([Work Day]=0,maxx(FILTER('Date',[Date]&amp;lt;EARLIER([Date]) &amp;amp;&amp;amp; [Work Day]&amp;lt;&amp;gt; EARLIER([Work Day]) ),[Date]),[Date])&lt;BR /&gt;Work Date cont Rank = RANKX(ALL('Date'),[Work Date Cont],,ASC,Dense)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if needed add workday filter in measure&lt;/P&gt;</description>
      <pubDate>Thu, 23 Dec 2021 08:26:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Showing-5-weekdays-data-from-the-selected-date/m-p/2253300#M54345</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2021-12-23T08:26:19Z</dc:date>
    </item>
    <item>
      <title>Re: Showing 5 weekdays data from the selected date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Showing-5-weekdays-data-from-the-selected-date/m-p/2253322#M54347</link>
      <description>&lt;P&gt;can you please attach your report ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Dec 2021 08:35:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Showing-5-weekdays-data-from-the-selected-date/m-p/2253322#M54347</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-12-23T08:35:10Z</dc:date>
    </item>
    <item>
      <title>Re: Showing 5 weekdays data from the selected date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Showing-5-weekdays-data-from-the-selected-date/m-p/2253329#M54348</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , This blog has table&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/Travelling-Across-Workdays-Decoding-Date-and-Calendar-4-5-Power/ba-p/1187766" target="_blank" rel="noopener"&gt;https://community.powerbi.com/t5/Community-Blog/Travelling-Across-Workdays-Decoding-Date-and-Calendar-4-5-Power/ba-p/1187766&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Other formulas I suggested, based on independent and dependent/joined date table &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If these do not help&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Dec 2021 08:57:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Showing-5-weekdays-data-from-the-selected-date/m-p/2253329#M54348</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2021-12-23T08:57:01Z</dc:date>
    </item>
    <item>
      <title>Re: Showing 5 weekdays data from the selected date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Showing-5-weekdays-data-from-the-selected-date/m-p/2256425#M54466</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here I suggest you to create an unrelated date table to create the date slicer. I add a rank column which sort all dates except weekends in my date table.&amp;nbsp;Here is my code.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Date =
VAR _Date =
    ADDCOLUMNS (
        CALENDARAUTO (),
        "Year", YEAR ( [Date] ),
        "Month", MONTH ( [Date] ),
        "WeekDay", WEEKDAY ( [Date] )
    )
VAR _ADDRank =
    ADDCOLUMNS (
        _Date,
        "Rank",
            IF (
                [WeekDay] IN { 6, 7 },
                BLANK (),
                RANKX ( FILTER ( _Date, NOT ( [WeekDay] IN { 6, 7 } ) ), [Date],, ASC )
            )
    )
RETURN
    _ADDRank&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then create a measure ,then add this measure into the filter field in your matrix visual and set it to show items when the value =1.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Filter = 
VAR _SELECTRANK =
    SELECTEDVALUE ( 'Date'[Rank] )
VAR _DATELIST =
    CALCULATETABLE (
        VALUES ( 'Date'[Date] ),
        FILTER (
            ALL ( 'Date' ),
            'Date'[Rank] &amp;gt;= _SELECTRANK
                &amp;amp;&amp;amp; 'Date'[Rank] &amp;lt;= _SELECTRANK + 4
        )
    )
RETURN
    IF ( MAX ( 'Table'[Date] ) IN _DATELIST, 1, 0 )&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Dec 2021 06:50:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Showing-5-weekdays-data-from-the-selected-date/m-p/2256425#M54466</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-12-27T06:50:23Z</dc:date>
    </item>
    <item>
      <title>Re: Showing 5 weekdays data from the selected date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Showing-5-weekdays-data-from-the-selected-date/m-p/2265219#M54851</link>
      <description>&lt;P&gt;Without filtering the slicer can we show 5days result like if we select a non working day from slicer it should the next 5 working days data. Instaed of filtering out the non working days from slicer try to display coming 5 working days. for example - if 25 december is holiday show the 5 days data from the next working day of december 25.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jan 2022 10:05:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Showing-5-weekdays-data-from-the-selected-date/m-p/2265219#M54851</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-01-04T10:05:55Z</dc:date>
    </item>
  </channel>
</rss>

