<?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: Flag controlling for latest weekday in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Flag-controlling-for-latest-weekday/m-p/2317316#M57766</link>
    <description>&lt;P&gt;How should I apply the measure with variables with below binding date table:&lt;/P&gt;&lt;P&gt;&lt;img /&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>Thu, 03 Feb 2022 09:27:23 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-02-03T09:27:23Z</dc:date>
    <item>
      <title>Flag controlling for latest weekday</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Flag-controlling-for-latest-weekday/m-p/2310378#M57408</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I have created a report displaying latest data from the day before. However, due to the weekends, mondays data is not showing the correct values, as the servers are not running in the weekend. Therefore, I need a measure/column that can control for this. Can anyone be of help?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have some very sensitiv data, why I can't share the file. If its not possible to help without, I will make a example file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jan 2022 10:12:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Flag-controlling-for-latest-weekday/m-p/2310378#M57408</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-01-31T10:12:12Z</dc:date>
    </item>
    <item>
      <title>Re: Flag controlling for latest weekday</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Flag-controlling-for-latest-weekday/m-p/2310457#M57411</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , try like &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;new 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;In you case you might have to use&lt;/P&gt;
&lt;P&gt;Work Date cont Rank = if([Work Day] =0&amp;nbsp; , blank(), RANKX(ALL('Date'),[Work Date],,ASC,Dense) )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then measure like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This Day = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Work Date cont Rank]=max('Date'[Work Date cont Rank])))&lt;BR /&gt;Last work day = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Work Date cont Rank]=max('Date'[Work Date cont Rank])-1))&lt;BR /&gt;diff =[This Day] - [Last work day]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&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"&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;</description>
      <pubDate>Mon, 31 Jan 2022 10:45:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Flag-controlling-for-latest-weekday/m-p/2310457#M57411</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-01-31T10:45:37Z</dc:date>
    </item>
    <item>
      <title>Re: Flag controlling for latest weekday</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Flag-controlling-for-latest-weekday/m-p/2310856#M57429</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I have a date table that I use for filtering out, so I tried the following:&lt;/P&gt;&lt;P&gt;PreviousWorkingDay_Yesterday SWITCH =&lt;BR /&gt;SWITCH(TRUE(),&lt;BR /&gt;WEEKDAY ( TODAY ()-1, 2 ) &amp;lt; 5, TODAY () - 1,&lt;BR /&gt;WEEKDAY ( TODAY ()-1, 2 ) = 6, TODAY () - 2,&lt;BR /&gt;TODAY () - 3&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;PreviousWorkingDay_Yesterday_flag SWITCH = IF(&lt;BR /&gt;Dates[PreviousWorkingDay_Yesterday SWITCH]=Dates[Date],TRUE()&lt;BR /&gt;,FALSE()&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;Just a bit unsure where to apply it.... Because if I add it to the filter and choose all values with TRUE it doesnt display anything. But I can see it from my table like below:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jan 2022 13:29:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Flag-controlling-for-latest-weekday/m-p/2310856#M57429</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-01-31T13:29:13Z</dc:date>
    </item>
    <item>
      <title>Re: Flag controlling for latest weekday</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Flag-controlling-for-latest-weekday/m-p/2317316#M57766</link>
      <description>&lt;P&gt;How should I apply the measure with variables with below binding date table:&lt;/P&gt;&lt;P&gt;&lt;img /&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>Thu, 03 Feb 2022 09:27:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Flag-controlling-for-latest-weekday/m-p/2317316#M57766</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-02-03T09:27:23Z</dc:date>
    </item>
  </channel>
</rss>

