<?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: dealing with time and ranges in dax in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dealing-with-time-and-ranges-in-dax/m-p/4635834#M177474</link>
    <description>&lt;P&gt;instead of posting a screenshot , post the data as a text table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I asked CoPilot but it balked after a small portion. Anyway, here is one example of how you can visualize this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&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;
&lt;P&gt;Total duration is SUMX(Table,[StepEnd]-[StepStart]) - that's all you need. You can use custom formatting if total duration exceeds 24 hrs.&lt;/P&gt;</description>
    <pubDate>Thu, 03 Apr 2025 00:19:26 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2025-04-03T00:19:26Z</dc:date>
    <item>
      <title>dealing with time and ranges in dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dealing-with-time-and-ranges-in-dax/m-p/4635685#M177468</link>
      <description>&lt;P&gt;Hi...man I've wasted so many hours today trying to figure this out.&amp;nbsp; I have two needs.&amp;nbsp; first, I have a column that already calculates the duration between two times.&amp;nbsp; The format of the results is 'hh:mm:ss'.&amp;nbsp; I have values ranging from '00:00:02' to '30:38:02'.&amp;nbsp; I want to plot these so first thing is how do i do a count where I can show total number for seconds, hours, and mins.&amp;nbsp; Then, I want to get deeper and get a count for say a range from 5 mins to 45 mins.&amp;nbsp; Or for 0-1 hours and then say &amp;gt;2 hours.&amp;nbsp; I've tried the conversion&amp;nbsp;&lt;A href="https://gist.github.com/jongio/5b8dcf13ab957cecfec3932a42db0e58" target="_blank"&gt;daxconvertsecondstotime · GitHub&lt;/A&gt;&amp;nbsp;to no avail.&amp;nbsp; The good news is that I have start times and end times split into dates and times columns, so it's easy to get the duration.&amp;nbsp; &amp;nbsp; What I can't do is associate counts to custom time ranges I want to create.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Apr 2025 20:37:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dealing-with-time-and-ranges-in-dax/m-p/4635685#M177468</guid>
      <dc:creator>cuseman03</dc:creator>
      <dc:date>2025-04-02T20:37:55Z</dc:date>
    </item>
    <item>
      <title>Re: dealing with time and ranges in dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dealing-with-time-and-ranges-in-dax/m-p/4635711#M177469</link>
      <description>&lt;LI-CODE lang="markup"&gt;The good news is that I have start times and end times split into dates and times columns&lt;/LI-CODE&gt;
&lt;P&gt;How is that good news?&amp;nbsp; You need to add these columns back together for this to work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please provide sample data that covers your issue or question &lt;STRONG&gt;completely&lt;/STRONG&gt;, in a &lt;STRONG&gt;usable&lt;/STRONG&gt; format (not as a screenshot).&lt;BR /&gt;Do not include sensitive information. Do not include anything that is unrelated to the issue or question. &lt;BR /&gt;Please show the expected outcome based on the sample data you provided. &lt;BR /&gt;&lt;BR /&gt;Need help uploading data? &lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216&lt;/A&gt; &lt;BR /&gt;Want faster answers? &lt;A href="https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Apr 2025 21:15:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dealing-with-time-and-ranges-in-dax/m-p/4635711#M177469</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2025-04-02T21:15:48Z</dc:date>
    </item>
    <item>
      <title>Re: dealing with time and ranges in dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dealing-with-time-and-ranges-in-dax/m-p/4635814#M177471</link>
      <description>&lt;P&gt;I've uploaded a screen shot.&amp;nbsp; So I have a list of ETLs.&amp;nbsp; Each ETL has steps that run daily, sometimes more than one time daily.&amp;nbsp; I have a full date/time start and end column.&amp;nbsp; I also took the duration and converted it to seconds to get total seconds.&amp;nbsp; First thing I want to do is create a group, say 9am-12pm and get a count of ETLs that start and end between these times.&amp;nbsp; In PBI in the report view, my 'stepstart' and 'stepend'columns only show date, no time.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The next thing I want to do is standardize on duration.&amp;nbsp; My logic is basically, 'IF 'total seconds' &amp;lt;=60, do nothing'.&amp;nbsp; This obviously means it's 60 seconds or less.&amp;nbsp; Then I want IF 'total seconds' &amp;gt;=3600 (we know we're dealing in hours since 3600 secs=1 hour) divide by 3600 to get hours.&amp;nbsp; For mins, &amp;gt;60 and less than 3600.&amp;nbsp; This way I could say X ETLs take X mins, Y secs, and Z hours.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How would I create a group that says something like 0-5 mins, or &amp;gt;10 mins?&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Apr 2025 23:53:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dealing-with-time-and-ranges-in-dax/m-p/4635814#M177471</guid>
      <dc:creator>cuseman03</dc:creator>
      <dc:date>2025-04-02T23:53:42Z</dc:date>
    </item>
    <item>
      <title>Re: dealing with time and ranges in dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dealing-with-time-and-ranges-in-dax/m-p/4635817#M177472</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Please provide sample data that covers your issue or question&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;completely&lt;/STRONG&gt;&lt;SPAN&gt;, in a&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;usable&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;format (&lt;STRONG&gt;not as a screenshot&lt;/STRONG&gt;).&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Apr 2025 23:56:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dealing-with-time-and-ranges-in-dax/m-p/4635817#M177472</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2025-04-02T23:56:34Z</dc:date>
    </item>
    <item>
      <title>Re: dealing with time and ranges in dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dealing-with-time-and-ranges-in-dax/m-p/4635821#M177473</link>
      <description>&lt;P&gt;not sure how i can do that since my pbix is linked to back end SQL Server and I can't share that&lt;/P&gt;</description>
      <pubDate>Thu, 03 Apr 2025 00:01:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dealing-with-time-and-ranges-in-dax/m-p/4635821#M177473</guid>
      <dc:creator>cuseman03</dc:creator>
      <dc:date>2025-04-03T00:01:48Z</dc:date>
    </item>
    <item>
      <title>Re: dealing with time and ranges in dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dealing-with-time-and-ranges-in-dax/m-p/4635834#M177474</link>
      <description>&lt;P&gt;instead of posting a screenshot , post the data as a text table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I asked CoPilot but it balked after a small portion. Anyway, here is one example of how you can visualize this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&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;
&lt;P&gt;Total duration is SUMX(Table,[StepEnd]-[StepStart]) - that's all you need. You can use custom formatting if total duration exceeds 24 hrs.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Apr 2025 00:19:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dealing-with-time-and-ranges-in-dax/m-p/4635834#M177474</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2025-04-03T00:19:26Z</dc:date>
    </item>
    <item>
      <title>Re: dealing with time and ranges in dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dealing-with-time-and-ranges-in-dax/m-p/4636374#M177494</link>
      <description>&lt;P&gt;Thankyou,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;&amp;nbsp;,for your response.&lt;BR /&gt;&lt;BR /&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="191050" data-lia-user-login="cuseman03" class="lia-mention lia-mention-user"&gt;cuseman03&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P class="" data-start="55" data-end="134"&gt;We sincerely appreciate your inquiry on the Microsoft Fabric Community Forum.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P class="" data-start="136" data-end="222"&gt;Please find attached the screenshot and PBIX file, which may help resolve the issue:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P class="" data-start="224" data-end="401"&gt;If you find our response helpful, we kindly request you to mark it as the accepted solution and provide kudos. This will assist other community members facing similar queries.&lt;/P&gt;
&lt;P class="" data-start="403" data-end="413"&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Apr 2025 09:07:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dealing-with-time-and-ranges-in-dax/m-p/4636374#M177494</guid>
      <dc:creator>v-pnaroju-msft</dc:creator>
      <dc:date>2025-04-03T09:07:47Z</dc:date>
    </item>
    <item>
      <title>Re: dealing with time and ranges in dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dealing-with-time-and-ranges-in-dax/m-p/4636787#M177529</link>
      <description>&lt;P&gt;you are amazing.&amp;nbsp; thank you!&amp;nbsp; i'd love to actually learn how you did this.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Apr 2025 12:44:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dealing-with-time-and-ranges-in-dax/m-p/4636787#M177529</guid>
      <dc:creator>cuseman03</dc:creator>
      <dc:date>2025-04-03T12:44:28Z</dc:date>
    </item>
    <item>
      <title>Re: dealing with time and ranges in dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dealing-with-time-and-ranges-in-dax/m-p/4637219#M177541</link>
      <description>&lt;P&gt;perhaps you can help with 2 additional matters.&amp;nbsp; I created a series for all 24 hours, in one hour increments.&amp;nbsp; I created an adjoining table to sort them earliest to latest and when I drop the sort filed in the tool tip it just doesn't work.&amp;nbsp; I essentially want to be able to sort the X axis by a field in another table that does not show up in the chart&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;as you can see from my screen shots, I have a sort table, it's a one-many join, and I apply that sort in the line chart but it doesn't come out right&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the last thing is how to handle this.&amp;nbsp; If I have an ETL that starts at 9:10pm and ends at 12:10am, I need to have a count of 4, one for hour 9-10, one for hour 10-11, one for hour 11-12, and one for 12am-1am.&amp;nbsp; How can i do this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Apr 2025 17:39:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dealing-with-time-and-ranges-in-dax/m-p/4637219#M177541</guid>
      <dc:creator>cuseman03</dc:creator>
      <dc:date>2025-04-03T17:39:10Z</dc:date>
    </item>
  </channel>
</rss>

