<?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: Create Mesuare the get the visit id based on entry and exit date in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-Mesuare-the-get-the-visit-id-based-on-entry-and-exit-date/m-p/3423794#M129655</link>
    <description>&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;This problem seems similar to the HR Analytics problem which has start date and end date.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;You can follow the video and find your solution.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;Power BI: HR Analytics - Employees as on Date : &lt;A title="https://youtu.be/e6y-l_jtcq4" href="https://youtu.be/e6Y-l_JtCq4" target="_blank" rel="noreferrer noopener"&gt;https://youtu.be/e6Y-l_JtCq4&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;&lt;A title="https://community.powerbi.com/t5/community-blog/hr-analytics-active-employee-hire-and-termination-trend/ba-p/882970" href="https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970" target="_blank" rel="noreferrer noopener"&gt;https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970&lt;/A&gt;&lt;BR /&gt;Power BI: HR Active Employee Tenure Bucketing, and Hired, Terminated, and Active employees: &lt;A title="https://youtu.be/fvgcx8qlqzu" href="https://youtu.be/fvgcx8QLqZU" target="_blank" rel="noreferrer noopener"&gt;https://youtu.be/fvgcx8QLqZU&lt;/A&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 11 Sep 2023 07:56:07 GMT</pubDate>
    <dc:creator>nirali_arora</dc:creator>
    <dc:date>2023-09-11T07:56:07Z</dc:date>
    <item>
      <title>Create Mesuare the get the visit id based on entry and exit date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-Mesuare-the-get-the-visit-id-based-on-entry-and-exit-date/m-p/3423665#M129644</link>
      <description>&lt;P&gt;HI ,&lt;/P&gt;&lt;P&gt;I have three tables visit data, contain details of customer visit with entry and exit date. A date table (contain all dates) and a customer date with customer date (id and name). I want a table where I can get for each date and each customer the city in which&amp;nbsp; customer was residing on the given date.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For date and customer table, I have done cross join, but I am not able to create a measure to get the visit id corresponding to date and customer value. PFA the demo pbix file.&amp;nbsp;&lt;BR /&gt;&lt;A href="https://drive.google.com/file/d/11gnlxWPg9hpYtBZr5bPJJd4ZeZWZSkc-/view?usp=sharing" target="_blank"&gt;https://drive.google.com/file/d/11gnlxWPg9hpYtBZr5bPJJd4ZeZWZSkc-/view?usp=sharing&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2023 06:58:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-Mesuare-the-get-the-visit-id-based-on-entry-and-exit-date/m-p/3423665#M129644</guid>
      <dc:creator>Anupam</dc:creator>
      <dc:date>2023-09-11T06:58:52Z</dc:date>
    </item>
    <item>
      <title>Re: Create Mesuare the get the visit id based on entry and exit date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-Mesuare-the-get-the-visit-id-based-on-entry-and-exit-date/m-p/3423794#M129655</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;This problem seems similar to the HR Analytics problem which has start date and end date.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;You can follow the video and find your solution.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;Power BI: HR Analytics - Employees as on Date : &lt;A title="https://youtu.be/e6y-l_jtcq4" href="https://youtu.be/e6Y-l_JtCq4" target="_blank" rel="noreferrer noopener"&gt;https://youtu.be/e6Y-l_JtCq4&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;&lt;A title="https://community.powerbi.com/t5/community-blog/hr-analytics-active-employee-hire-and-termination-trend/ba-p/882970" href="https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970" target="_blank" rel="noreferrer noopener"&gt;https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970&lt;/A&gt;&lt;BR /&gt;Power BI: HR Active Employee Tenure Bucketing, and Hired, Terminated, and Active employees: &lt;A title="https://youtu.be/fvgcx8qlqzu" href="https://youtu.be/fvgcx8QLqZU" target="_blank" rel="noreferrer noopener"&gt;https://youtu.be/fvgcx8QLqZU&lt;/A&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2023 07:56:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-Mesuare-the-get-the-visit-id-based-on-entry-and-exit-date/m-p/3423794#M129655</guid>
      <dc:creator>nirali_arora</dc:creator>
      <dc:date>2023-09-11T07:56:07Z</dc:date>
    </item>
    <item>
      <title>Re: Create Mesuare the get the visit id based on entry and exit date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-Mesuare-the-get-the-visit-id-based-on-entry-and-exit-date/m-p/3423829#M129657</link>
      <description>&lt;P&gt;Hi, a measure might be&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;VisitID =
VAR selected_date = MAX ( Customer_date[Date] )
VAR customerid = MAX ( Customer_date[id] )
RETURN
    CALCULATE (
        MAX ( VisitData[City] ),
        VisitData[Customer] = customerid,
        VisitData[Entry Date] &amp;lt;= selected_date,
        VisitData[Exit Date] &amp;gt; selected_date
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2023 08:08:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-Mesuare-the-get-the-visit-id-based-on-entry-and-exit-date/m-p/3423829#M129657</guid>
      <dc:creator>ERD</dc:creator>
      <dc:date>2023-09-11T08:08:31Z</dc:date>
    </item>
    <item>
      <title>Re: Create Mesuare the get the visit id based on entry and exit date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-Mesuare-the-get-the-visit-id-based-on-entry-and-exit-date/m-p/3424014#M129672</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="611308" data-lia-user-login="Anupam" class="lia-mention lia-mention-user"&gt;Anupam&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I downloaded your file and noted that in the file a relationship was created between the transaction ID in the fact table 'VisitData' and the customer ID in the customer dimension table, so I changed that relationship to be between customer ID and customer # in the 'VisitData', as I thought you meant to create that relationship instead.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The resultant relationship in the data model looks like below:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then, I created a measures like below to identify the trip locations and ID visited by customers at a given date.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've then combined these measures in a table measure like below. As you can see, when the customer ID #1 travels from Indore to Mumbai on May 1, 2023, both travel ID #1 and #11 apear on the row of that date with two location names.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I attach the pbix file below:&lt;/P&gt;&lt;P&gt;&lt;A href="https://1drv.ms/u/s!AlqFfzVTqicpng6_MXs6jtGD6e-W?e=YMVxFg" target="_blank"&gt;Travel location ID.pbix&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2023 09:37:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-Mesuare-the-get-the-visit-id-based-on-entry-and-exit-date/m-p/3424014#M129672</guid>
      <dc:creator>DataNinja777</dc:creator>
      <dc:date>2023-09-11T09:37:05Z</dc:date>
    </item>
  </channel>
</rss>

