<?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 Previous workday &amp;quot;switch&amp;quot; calculated column in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-workday-quot-switch-quot-calculated-column/m-p/840249#M6348</link>
    <description>&lt;P&gt;I have a two date tables. One created using DAX and another from imported from excel. I have created a workday column based on the two tables "&lt;SPAN&gt;Workday = If(or('Date'[WeekdayNo] = 1,'Date'[WeekdayNo]=7),0,If(isblank(RELATED(HOLIDAYS[HolidayDesc])),1,0))"&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've also created a column that returns the date of the previous workday "&lt;SPAN&gt;PrevWorkDay =&lt;/SPAN&gt;&lt;SPAN&gt;VAR NextWorkingDay =&lt;/SPAN&gt;&lt;SPAN&gt;MAXX (&lt;/SPAN&gt;&lt;SPAN&gt;FILTER (&lt;/SPAN&gt;&lt;SPAN&gt;'Date',&lt;/SPAN&gt;&lt;SPAN&gt;'Date'[Date] &amp;lt; EARLIER ( 'Date'[Date] )&lt;/SPAN&gt;&lt;SPAN&gt;&amp;amp;&amp;amp;'Date'[Workday] = 1&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;'Date'[Date]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;SPAN&gt;RETURN&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;IF ( 'Date'[Workday] = 0, NextWorkingDay, NextWorkingDay )"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I would like one more column that would allow for a filter (Yes/No or 0/1) for previous workday based on today's date.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 07 Nov 2019 20:23:06 GMT</pubDate>
    <dc:creator>Agent007</dc:creator>
    <dc:date>2019-11-07T20:23:06Z</dc:date>
    <item>
      <title>Previous workday "switch" calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-workday-quot-switch-quot-calculated-column/m-p/840249#M6348</link>
      <description>&lt;P&gt;I have a two date tables. One created using DAX and another from imported from excel. I have created a workday column based on the two tables "&lt;SPAN&gt;Workday = If(or('Date'[WeekdayNo] = 1,'Date'[WeekdayNo]=7),0,If(isblank(RELATED(HOLIDAYS[HolidayDesc])),1,0))"&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've also created a column that returns the date of the previous workday "&lt;SPAN&gt;PrevWorkDay =&lt;/SPAN&gt;&lt;SPAN&gt;VAR NextWorkingDay =&lt;/SPAN&gt;&lt;SPAN&gt;MAXX (&lt;/SPAN&gt;&lt;SPAN&gt;FILTER (&lt;/SPAN&gt;&lt;SPAN&gt;'Date',&lt;/SPAN&gt;&lt;SPAN&gt;'Date'[Date] &amp;lt; EARLIER ( 'Date'[Date] )&lt;/SPAN&gt;&lt;SPAN&gt;&amp;amp;&amp;amp;'Date'[Workday] = 1&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;'Date'[Date]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;SPAN&gt;RETURN&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;IF ( 'Date'[Workday] = 0, NextWorkingDay, NextWorkingDay )"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I would like one more column that would allow for a filter (Yes/No or 0/1) for previous workday based on today's date.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2019 20:23:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-workday-quot-switch-quot-calculated-column/m-p/840249#M6348</guid>
      <dc:creator>Agent007</dc:creator>
      <dc:date>2019-11-07T20:23:06Z</dc:date>
    </item>
  </channel>
</rss>

