<?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: Calculating the duration of event with several overalapping interval filters in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-the-duration-of-event-with-several-overalapping/m-p/772702#M3752</link>
    <description>&lt;P&gt;I am trying on my own, to no avail. Any ideas?&lt;/P&gt;</description>
    <pubDate>Thu, 22 Aug 2019 07:14:27 GMT</pubDate>
    <dc:creator>Pavel_Bazlov</dc:creator>
    <dc:date>2019-08-22T07:14:27Z</dc:date>
    <item>
      <title>Calculating the duration of event with several overalapping interval filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-the-duration-of-event-with-several-overalapping/m-p/764341#M3334</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a data model which I am trying to use to calculate KPI's based on Service Level Agreement (IT outsourcing stuff).&lt;/P&gt;&lt;P&gt;The data model contains the following tables:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ticket History - describes all states in which all tickets were in with all relevant information: state, state start datetime, state end datetime&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Ticket ID&lt;/LI&gt;&lt;LI&gt;Service Group&lt;/LI&gt;&lt;LI&gt;Assignee&lt;/LI&gt;&lt;LI&gt;Ticket State&lt;/LI&gt;&lt;LI&gt;Event Start&lt;/LI&gt;&lt;LI&gt;Event End&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;Ticket ID - Service Group - Assignee - Ticket State - Event Start - Event End&lt;/P&gt;&lt;P&gt;1 - Service Desk - Mark - Assigned - 01.01.2018 08:00:00 - 01.01.2018 09:00:00&lt;/P&gt;&lt;P&gt;1 - Service Desk - Mark - Work in Progress - 01.01.2018 09:00:00 - 09.01.2018 10:00:00&lt;/P&gt;&lt;P&gt;1 - Service Desk - Mark - Solved - 09.01.2018 10:00:00 - 09.01.2018 11:00:00&lt;/P&gt;&lt;P&gt;2 - Datacenter Support - John - Assigned - 01.01.2018 08:00:00 - 01.01.2018 08:30:00&lt;/P&gt;&lt;P&gt;2 - Datacenter Support - Mark - Suspended - 01.01.2018 08:30:00 - 09.01.2018 09:00:00&lt;/P&gt;&lt;P&gt;2 - Datacenter Support - Mark - Work in Progress - 09.01.2018 09:00:00 - 09.01.2018 20:00:00&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Calendar - standart date table with calulated columns for year, month, etc.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;date&lt;/LI&gt;&lt;LI&gt;Year&lt;/LI&gt;&lt;LI&gt;Week day&lt;/LI&gt;&lt;LI&gt;Day type : working / non-working based on local calendar&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;date - Year - Week Day - Day type&lt;/P&gt;&lt;P&gt;01.01.2018 - 2018 - Monday - Non working day&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;02.01.2018 - 2018 - Tuesday - Non working day&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;03.01.2018 - 2018 - Wednesday - Non working day&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;04.01.2018 - 2018 - Thursday - Non working day&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;05.01.2018 - 2018 - Friday - Non working day&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;06.01.2018 - 2018 - Saturday - Non working day&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;07.01.2018 - 2018 - Sunday - Non working day&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;08.01.2018 - 2018 - Monday - Non working day&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;09.01.2018 - 2018 - Tuesday - Working day&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;10.01.2018 - 2018 - Wednesday - Working day&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Teams - dimension table grouping Service groups by services.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Team&lt;/LI&gt;&lt;LI&gt;Service&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;Team - Service&lt;/P&gt;&lt;P&gt;Service Desk - 1st line support&lt;/P&gt;&lt;P&gt;Datacenter Support - Datacenter Support&lt;/P&gt;&lt;P&gt;Storage Support - Datacenter Support&lt;/P&gt;&lt;P&gt;Database Support - Datacenter Support&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Service Time - table specifies service times for each service.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Service&lt;/LI&gt;&lt;LI&gt;Day type&lt;/LI&gt;&lt;LI&gt;Service Start&lt;/LI&gt;&lt;LI&gt;Service End&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;Service - Day type - Service Start - Service End&lt;/P&gt;&lt;P&gt;1st Line Support - Working day - 08:00:00 - 20:00:00&lt;/P&gt;&lt;P&gt;1st line Support - non-working day - N/A - N/A&lt;/P&gt;&lt;P&gt;Datacenter Support - Working day - 00:00:00 - 23:59:59&lt;/P&gt;&lt;P&gt;Datacenter Support - non-Working day - 00:00:00 - 23:59:59&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I need to create a measure (I do not like calculated columns) that will calculate duration of an event in the table Ticket History considering the service time, let's call it duration and the result of it is in minutes:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ticket ID - Service Group - Assignee - Ticket State - Event Start - Event End - Duration&lt;/P&gt;&lt;P&gt;1 - Service Desk - Mark - Assigned - 01.01.2018 08:00:00 - 01.01.2018 09:00:00 - 0&lt;/P&gt;&lt;P&gt;Comment: as service time for 1st line support service Service Desk service group is a part of is 8:00 to 20:00 for all working days and 01.01.2018 - is not a working day, there are no service hours so the duration is 0&lt;/P&gt;&lt;P&gt;1 - Service Desk - Mark - Work in Progress - 01.01.2018 09:00:00 - 09.01.2018 10:00:00 - 120&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Comment: as service time for 1st line support service Service Desk service group is a part of is 8:00 to 20:00 for all working days and 01-08.01.2018 - are not a working days, the only overlapping of service hours and the event period is on 09.01.2018 starting 08:00:00 (service time start for 1st line support) till 10:00:00 (the end of the event) and it is 120 minutes&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;1 - Service Desk - Mark - Solved - 09.01.2018 10:00:00 - 09.01.2018 11:00:00 - 60&lt;/P&gt;&lt;P&gt;2 - Datacenter Support - John - Assigned - 01.01.2018 08:00:00 - 01.01.2018 08:30:00 - 30&lt;/P&gt;&lt;P&gt;2 - Datacenter Support - Mark - Suspended - 01.01.2018 08:30:00 - 09.01.2018 09:00:00 -&amp;nbsp;&lt;FONT&gt;11550&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;Comment: for Datacenter Support service hours are basically 24х7 so the duration is simply the number of minutes between &lt;SPAN&gt;01.01.2018 08:30:00 and 09.01.2018 09:00:00 whish is&amp;nbsp;&lt;FONT&gt;11550&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;2 - Datacenter Support - Mark - Work in Progress - 09.01.2018 09:00:00 - 09.01.2018 20:00:00 - 660&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just can't wrap my head around this. Please help!&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2019 15:09:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-the-duration-of-event-with-several-overalapping/m-p/764341#M3334</guid>
      <dc:creator>Pavel_Bazlov</dc:creator>
      <dc:date>2019-08-12T15:09:07Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating the duration of event with several overalapping interval filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-the-duration-of-event-with-several-overalapping/m-p/764430#M3338</link>
      <description>&lt;P&gt;So, if that last table is an example, what would the expected output be?&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2019 17:04:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-the-duration-of-event-with-several-overalapping/m-p/764430#M3338</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2019-08-12T17:04:45Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating the duration of event with several overalapping interval filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-the-duration-of-event-with-several-overalapping/m-p/764466#M3344</link>
      <description>&lt;P&gt;The last table is the expected output. As I have stated I need a measure for Ticket History table which will count the duration for each row. As you can see, the last table is the Ticket History table but with a column "Duration" representing the value of the needed measure as I would expect it.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2019 17:45:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-the-duration-of-event-with-several-overalapping/m-p/764466#M3344</guid>
      <dc:creator>Pavel_Bazlov</dc:creator>
      <dc:date>2019-08-12T17:45:33Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating the duration of event with several overalapping interval filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-the-duration-of-event-with-several-overalapping/m-p/764578#M3360</link>
      <description>Therefore you need a calculated column, not a measure. But this could be done in Power Query, probably even more easily.&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;Darek</description>
      <pubDate>Mon, 12 Aug 2019 21:25:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-the-duration-of-event-with-several-overalapping/m-p/764578#M3360</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-12T21:25:51Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating the duration of event with several overalapping interval filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-the-duration-of-event-with-several-overalapping/m-p/764829#M3381</link>
      <description>&lt;P&gt;Guys, any thoughts on the formula itself?&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2019 05:43:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-the-duration-of-event-with-several-overalapping/m-p/764829#M3381</guid>
      <dc:creator>Pavel_Bazlov</dc:creator>
      <dc:date>2019-08-13T05:43:10Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating the duration of event with several overalapping interval filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-the-duration-of-event-with-several-overalapping/m-p/766084#M3455</link>
      <description>&lt;P&gt;At this point calculated column would suffice. Any ideas?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2019 07:30:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-the-duration-of-event-with-several-overalapping/m-p/766084#M3455</guid>
      <dc:creator>Pavel_Bazlov</dc:creator>
      <dc:date>2019-08-14T07:30:02Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating the duration of event with several overalapping interval filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-the-duration-of-event-with-several-overalapping/m-p/772702#M3752</link>
      <description>&lt;P&gt;I am trying on my own, to no avail. Any ideas?&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2019 07:14:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-the-duration-of-event-with-several-overalapping/m-p/772702#M3752</guid>
      <dc:creator>Pavel_Bazlov</dc:creator>
      <dc:date>2019-08-22T07:14:27Z</dc:date>
    </item>
  </channel>
</rss>

