<?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 Variable Start and End Time per Country in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Variable-Start-and-End-Time-per-Country/m-p/3592287#M138707</link>
    <description>&lt;P&gt;Hello Everyone,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have crated a column using variables, but i have a problem set specific Start Time and End Time depending each Country.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Business Elapsed Hours (Created to Screening) = VAR BusHoursStart = TIME(09,45,00)&lt;BR /&gt;VAR BusHoursEnd = TIME(18,15,00).&lt;/P&gt;&lt;P&gt;I want BusHoursStart to be (09,45,00) if the values of column Country are (Greece or France), and BusHoursStart (11,45,00) if values are (UK or USA).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 19 Dec 2023 20:15:22 GMT</pubDate>
    <dc:creator>T-Pan</dc:creator>
    <dc:date>2023-12-19T20:15:22Z</dc:date>
    <item>
      <title>Variable Start and End Time per Country</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Variable-Start-and-End-Time-per-Country/m-p/3592287#M138707</link>
      <description>&lt;P&gt;Hello Everyone,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have crated a column using variables, but i have a problem set specific Start Time and End Time depending each Country.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Business Elapsed Hours (Created to Screening) = VAR BusHoursStart = TIME(09,45,00)&lt;BR /&gt;VAR BusHoursEnd = TIME(18,15,00).&lt;/P&gt;&lt;P&gt;I want BusHoursStart to be (09,45,00) if the values of column Country are (Greece or France), and BusHoursStart (11,45,00) if values are (UK or USA).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Dec 2023 20:15:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Variable-Start-and-End-Time-per-Country/m-p/3592287#M138707</guid>
      <dc:creator>T-Pan</dc:creator>
      <dc:date>2023-12-19T20:15:22Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Start and End Time per Country</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Variable-Start-and-End-Time-per-Country/m-p/3592410#M138714</link>
      <description>&lt;P&gt;Not sure if I understood your problem statement correctly on how dynamic you want this to be , but as a generic -&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Create two custom columns 1 for start time and 1 for end time&lt;/P&gt;&lt;P&gt;2. sample dax for start -&lt;/P&gt;&lt;P&gt;Business Hours Start =&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;var _bushourstart1 = Time(09,45,00)&lt;/P&gt;&lt;P&gt;var _bushourstart2 = Time(11,45,00)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Retrun&amp;nbsp;&lt;/P&gt;&lt;P&gt;switch(&lt;/P&gt;&lt;P&gt;True(),&lt;/P&gt;&lt;P&gt;table[country] == "USA", _bushourstart2,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;table[country] == "UK", _bushourstart2,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;table[country] == "France", _bushourstart1,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;table[country] == "Greece", _bushourstart2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;3. do the same step for endtime&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if you want dymamic then need to put these country and start and endtime in a master table or file then join with data table and need to change the dax field accordingly&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Dec 2023 22:53:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Variable-Start-and-End-Time-per-Country/m-p/3592410#M138714</guid>
      <dc:creator>sdg1393</dc:creator>
      <dc:date>2023-12-19T22:53:29Z</dc:date>
    </item>
  </channel>
</rss>

