<?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 How to find hours range in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-find-hours-range/m-p/3249155#M119832</link>
    <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;have one question ..... how we can configure the below range in one measure , please check and guide me&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&amp;lt;=3 hrs&lt;/TD&gt;&lt;TD&gt;3-8 hrs&lt;/TD&gt;&lt;TD&gt;8-12 hrs&lt;/TD&gt;&lt;TD&gt;12-24 hrs&lt;/TD&gt;&lt;TD&gt;&amp;gt;24 hrs&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Krishna&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 23 May 2023 07:28:31 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-05-23T07:28:31Z</dc:date>
    <item>
      <title>How to find hours range</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-find-hours-range/m-p/3249155#M119832</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;have one question ..... how we can configure the below range in one measure , please check and guide me&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&amp;lt;=3 hrs&lt;/TD&gt;&lt;TD&gt;3-8 hrs&lt;/TD&gt;&lt;TD&gt;8-12 hrs&lt;/TD&gt;&lt;TD&gt;12-24 hrs&lt;/TD&gt;&lt;TD&gt;&amp;gt;24 hrs&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Krishna&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 May 2023 07:28:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-find-hours-range/m-p/3249155#M119832</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-05-23T07:28:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to find hours range</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-find-hours-range/m-p/3250207#M119897</link>
      <description>&lt;P&gt;Hi Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are bit unclear with your table structure where you capture the Hours data, so we have considered below table which holds hours value,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, the Slicer to filter these hours, we have created a table with options you mentioned as shown in below screenshot.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In order to filter the data based on selection you need to create a Measure in Data table with DAX expression as:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Filter Hours = SWITCH(SELECTEDVALUE(Hours[Hours]), "&amp;lt;=3 hrs", IF(SELECTEDVALUE(Data[Data Hours])&amp;lt;=3,"In","Out") ,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; "3-8 hrs",IF(SELECTEDVALUE(Data[Data Hours])&amp;gt;3 &amp;amp;&amp;amp; SELECTEDVALUE(Data[Data Hours])&amp;lt;8,"In","Out")&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; ,"8-12 hrs",IF(SELECTEDVALUE(Data[Data Hours])&amp;gt;=8 &amp;amp;&amp;amp; SELECTEDVALUE(Data[Data Hours])&amp;lt;12,"In","Out"),&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; "12-24 hrs",IF(SELECTEDVALUE(Data[Data Hours])&amp;gt;12 &amp;amp;&amp;amp; SELECTEDVALUE(Data[Data Hours])&amp;lt;=24,"In","Out"),&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; "&amp;gt;24 hrs",IF(SELECTEDVALUE(Data[Data Hours])&amp;gt;24,"In","Out")&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This will check the selected value in the slicer i.e. filter and based on current value of table row validate the hours falls within selected range or out of the range.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please refer to the below screenshot for the same.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Now in order to filter the table for respective data to be displayed in table as per the range selection we need to add filter to the table as Filter Hours = In as shown in the below screenshot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;If this answer helps, please mark it as an Accepted Solution so it would help others to find the solution.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks!&lt;/P&gt;&lt;P&gt;Inogic Professional Service Division&lt;/P&gt;&lt;P&gt;An expert technical extension for your techno-functional business needs&lt;/P&gt;&lt;P&gt;Power Platform/Dynamics 365 CRM&lt;/P&gt;&lt;P&gt;Drop an email at &lt;A href="mailto:crm@inogic.com" target="_blank"&gt;crm@inogic.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Service:&amp;nbsp; &lt;A href="http://www.inogic.com/services/" target="_blank"&gt;http://www.inogic.com/services/&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Power Platform/Dynamics 365 CRM Tips and Tricks:&amp;nbsp; &lt;A href="http://www.inogic.com/blog/" target="_blank"&gt;http://www.inogic.com/blog/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2023 06:03:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-find-hours-range/m-p/3250207#M119897</guid>
      <dc:creator>SamInogic</dc:creator>
      <dc:date>2023-05-24T06:03:19Z</dc:date>
    </item>
  </channel>
</rss>

