<?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: In the desktop, the date logic is right, but not in the service. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/In-the-desktop-the-date-logic-is-right-but-not-in-the-service/m-p/2586721#M74411</link>
    <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are desktop and Server time zones same or not?&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Service/changing-timezone-of-powerbi-service/m-p/153663#:~:text=I%20was%20able%20to%20solve%20this%20by%20first,zone%20on%20your%20power%20bi%20service%20to%20local." target="_blank" rel="noopener"&gt;Solved: changing timezone of powerbi service? - Microsoft Power BI Community&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ritesh&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;Mark my post as a solution if it helped you&lt;/FONT&gt;|&lt;FONT color="#000000"&gt;&amp;nbsp;Munde and Kudis (Ladies and Gentlemen) I like your Kudos!!&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000000"&gt;&amp;nbsp;!!&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;&lt;A href="https://www.youtube.com/channel/UCOK8xNgwlypFkU6aCEThCmw" target="_self" rel="nofollow noreferrer noopener"&gt;My YT Channel Dancing With Data&lt;/A&gt;&amp;nbsp;!!&amp;nbsp;&lt;A href="https://www.linkedin.com/in/ritesh-bisht-22238913/" target="_self" rel="nofollow noreferrer noopener"&gt;Connect on Linkedin&lt;/A&gt;&amp;nbsp;!!&lt;A href="https://www.youtube.com/watch?v=XE-HehSTmGo&amp;amp;list=PL9z26CJ-fucFCNaSAKlBujSFY22tZhcDr" target="_self" rel="nofollow noopener noreferrer"&gt;Power BI for Tableau Users&lt;/A&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 18 Jun 2022 11:50:43 GMT</pubDate>
    <dc:creator>ribisht17</dc:creator>
    <dc:date>2022-06-18T11:50:43Z</dc:date>
    <item>
      <title>In the desktop, the date logic is right, but not in the service.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/In-the-desktop-the-date-logic-is-right-but-not-in-the-service/m-p/2586339#M74394</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've created a table that is based on a Microsoft Exchange calendar. I'm having trouble getting a day offset based on a column on column, but only if my user scheduled column has a value. It is offsetting based on the exchange calendar date. My DAX logic is a little weird, but the problem is that it works well on the desktop. However, after I publish it, the date is pushed back an extra day or two. I'm stumped as to why this is. What are your thoughts on this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;DNE Date = 
var PrevDay = 'Schedule Calendar'[Start].[Date] - 1 -- **DNE date is always one day before the start date that somone works it.**
Var NewDay1 = IF( FORMAT(PrevDay,"DDD") = "Sat", PrevDay-1, 
        IF( FORMAT( PrevDay,"DDD") = "Sun", PrevDay-2, 
        PrevDay)
        ) -- **for testing if PrevDay is a weekend.**
Var Holi = IF( CALCULATE( MAX('Schedule Calendar'[User Scheduled]), FILTER('Schedule Calendar', NewDay1 = 'Schedule Calendar'[Start])) = "", NewDay1 -1, NewDay1) -- **for is there what no one seduled, mostly holidays.**
Var NewDay2 = IF( FORMAT(Holi,"DDD") = "Sat", Holi-1, 
        IF( FORMAT( Holi,"DDD") = "Sun", Holi-2, 
        Holi)
        ) -- **for if day after Holi is weekend.**

return IF( 'Schedule Calendar'[User Scheduled] = "", BLANK(),
            IF('Schedule Calendar'[Start] = DATE(2022,2,17), DATE(2022,2,16), -- **2nd if added for earliest date in start, 'Holi' logic does not work for the first date and returns with extra day. this is a one off.**
                 NewDay2)) &lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 17 Jun 2022 19:50:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/In-the-desktop-the-date-logic-is-right-but-not-in-the-service/m-p/2586339#M74394</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-17T19:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: In the desktop, the date logic is right, but not in the service.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/In-the-desktop-the-date-logic-is-right-but-not-in-the-service/m-p/2586721#M74411</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are desktop and Server time zones same or not?&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Service/changing-timezone-of-powerbi-service/m-p/153663#:~:text=I%20was%20able%20to%20solve%20this%20by%20first,zone%20on%20your%20power%20bi%20service%20to%20local." target="_blank" rel="noopener"&gt;Solved: changing timezone of powerbi service? - Microsoft Power BI Community&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ritesh&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;Mark my post as a solution if it helped you&lt;/FONT&gt;|&lt;FONT color="#000000"&gt;&amp;nbsp;Munde and Kudis (Ladies and Gentlemen) I like your Kudos!!&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000000"&gt;&amp;nbsp;!!&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;&lt;A href="https://www.youtube.com/channel/UCOK8xNgwlypFkU6aCEThCmw" target="_self" rel="nofollow noreferrer noopener"&gt;My YT Channel Dancing With Data&lt;/A&gt;&amp;nbsp;!!&amp;nbsp;&lt;A href="https://www.linkedin.com/in/ritesh-bisht-22238913/" target="_self" rel="nofollow noreferrer noopener"&gt;Connect on Linkedin&lt;/A&gt;&amp;nbsp;!!&lt;A href="https://www.youtube.com/watch?v=XE-HehSTmGo&amp;amp;list=PL9z26CJ-fucFCNaSAKlBujSFY22tZhcDr" target="_self" rel="nofollow noopener noreferrer"&gt;Power BI for Tableau Users&lt;/A&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 18 Jun 2022 11:50:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/In-the-desktop-the-date-logic-is-right-but-not-in-the-service/m-p/2586721#M74411</guid>
      <dc:creator>ribisht17</dc:creator>
      <dc:date>2022-06-18T11:50:43Z</dc:date>
    </item>
    <item>
      <title>Re: In the desktop, the date logic is right, but not in the service.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/In-the-desktop-the-date-logic-is-right-but-not-in-the-service/m-p/2592841#M74737</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="369860" data-lia-user-login="ribisht17" class="lia-mention lia-mention-user"&gt;ribisht17&lt;/a&gt;&amp;nbsp; I'm in Central Time, not UTC Time, so they won't match. How does this matter because none of the calculations take into account time, only the date?&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jun 2022 16:35:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/In-the-desktop-the-date-logic-is-right-but-not-in-the-service/m-p/2592841#M74737</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-21T16:35:27Z</dc:date>
    </item>
  </channel>
</rss>

