<?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: Measure to Convert UTC to local time, accounting for daylight savings in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-to-Convert-UTC-to-local-time-accounting-for-daylight/m-p/3040509#M104266</link>
    <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="484527" data-lia-user-login="mll92" class="lia-mention lia-mention-user"&gt;mll92&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;tried to write a measure like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Measure = 
VAR _table = 
ADDCOLUMNS(
    ALL(DateTable[Date]),
    "Day",
    WEEKDAY(DateTable[Date], 2),
    "Month",
    MONTH(DateTable[Date])
)
VAR _table1 = 
FILTER(
    _table,
    [Month]=3&amp;amp;&amp;amp;[Day] = 7
)
VAR _shiftdate = 
EXCEPT(
    TOPN(
      2,
      _table1,
      DateTable[Date],
      ASC
    ),
TOPN(
      1,
      _table1,
      DateTable[Date],
      ASC
    )
)
VAR _shiftdate2 = MINX(_shiftdate, [Date])
RETURN
IF(
    MAX([Date])&amp;lt;_shiftdate2,
    MAX([Date]) - TIME(5,0,0),
    MAX([Date]) - TIME(4,0,0)
)&lt;/LI-CODE&gt;&lt;P&gt;When plot a table visual with the date column, it worked like this:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 24 Jan 2023 14:19:51 GMT</pubDate>
    <dc:creator>FreemanZ</dc:creator>
    <dc:date>2023-01-24T14:19:51Z</dc:date>
    <item>
      <title>Measure to Convert UTC to local time, accounting for daylight savings</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-to-Convert-UTC-to-local-time-accounting-for-daylight/m-p/3038833#M104153</link>
      <description>&lt;P&gt;Hello. I am creating a dashboard using a direct query to Dataverse, with automatic page refresh when a change is detected. Because I am using direct query, I can do very little transformation in Power Query. And because I am using automatic page refreshes, I cannot use calculated tables or columns because then the visuals do not refresh when a change is detected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As a result, most of my table columns in the table visuals are coming from measures. I have one measure to convert the time from UTC to local (local date = Selectedvalue(table[date/time]) - TIME(5,0,0).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I need a way to condition this statement so if the date falls within daylight savings time, the measure will only subtract 4 hours. Is this possible? I found several articles on how to do this in power query, but I cannot use power query for this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2023 20:56:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-to-Convert-UTC-to-local-time-accounting-for-daylight/m-p/3038833#M104153</guid>
      <dc:creator>mll92</dc:creator>
      <dc:date>2023-01-23T20:56:49Z</dc:date>
    </item>
    <item>
      <title>Re: Measure to Convert UTC to local time, accounting for daylight savings</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-to-Convert-UTC-to-local-time-accounting-for-daylight/m-p/3038842#M104154</link>
      <description>&lt;P&gt;hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="484527" data-lia-user-login="mll92" class="lia-mention lia-mention-user"&gt;mll92&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how is daylight savings time is defined in your region?&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2023 21:12:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-to-Convert-UTC-to-local-time-accounting-for-daylight/m-p/3038842#M104154</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-01-23T21:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: Measure to Convert UTC to local time, accounting for daylight savings</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-to-Convert-UTC-to-local-time-accounting-for-daylight/m-p/3040307#M104247</link>
      <description>&lt;P&gt;On the second Sunday in March, the difference between UCT and local will change from -5 hours to -4 hours. Then return to -5 on the first Sunday in November&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 13:18:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-to-Convert-UTC-to-local-time-accounting-for-daylight/m-p/3040307#M104247</guid>
      <dc:creator>mll92</dc:creator>
      <dc:date>2023-01-24T13:18:12Z</dc:date>
    </item>
    <item>
      <title>Re: Measure to Convert UTC to local time, accounting for daylight savings</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-to-Convert-UTC-to-local-time-accounting-for-daylight/m-p/3040509#M104266</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="484527" data-lia-user-login="mll92" class="lia-mention lia-mention-user"&gt;mll92&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;tried to write a measure like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Measure = 
VAR _table = 
ADDCOLUMNS(
    ALL(DateTable[Date]),
    "Day",
    WEEKDAY(DateTable[Date], 2),
    "Month",
    MONTH(DateTable[Date])
)
VAR _table1 = 
FILTER(
    _table,
    [Month]=3&amp;amp;&amp;amp;[Day] = 7
)
VAR _shiftdate = 
EXCEPT(
    TOPN(
      2,
      _table1,
      DateTable[Date],
      ASC
    ),
TOPN(
      1,
      _table1,
      DateTable[Date],
      ASC
    )
)
VAR _shiftdate2 = MINX(_shiftdate, [Date])
RETURN
IF(
    MAX([Date])&amp;lt;_shiftdate2,
    MAX([Date]) - TIME(5,0,0),
    MAX([Date]) - TIME(4,0,0)
)&lt;/LI-CODE&gt;&lt;P&gt;When plot a table visual with the date column, it worked like this:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 14:19:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-to-Convert-UTC-to-local-time-accounting-for-daylight/m-p/3040509#M104266</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-01-24T14:19:51Z</dc:date>
    </item>
    <item>
      <title>Re: Measure to Convert UTC to local time, accounting for daylight savings</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-to-Convert-UTC-to-local-time-accounting-for-daylight/m-p/3040589#M104278</link>
      <description>&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 14:42:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-to-Convert-UTC-to-local-time-accounting-for-daylight/m-p/3040589#M104278</guid>
      <dc:creator>mll92</dc:creator>
      <dc:date>2023-01-24T14:42:09Z</dc:date>
    </item>
  </channel>
</rss>

