<?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: Dynamic  Unique Visitors in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Unique-Visitors/m-p/2407221#M63263</link>
    <description>&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;I understand. I will make up some data to experiment with but only can look at it a bit later today. Thanks!&lt;/P&gt;</description>
    <pubDate>Mon, 21 Mar 2022 16:54:08 GMT</pubDate>
    <dc:creator>Whitewater100</dc:creator>
    <dc:date>2022-03-21T16:54:08Z</dc:date>
    <item>
      <title>Dynamic  Unique Visitors</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Unique-Visitors/m-p/2403625#M63023</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to calculate the number of unique visitors based on the date range that the user decides to see. For example, if I select a date between last week and today, I would like to see the number of unique visitors of that period; if I select only yestarday and today, I would like to see the new visitors from yesterday until now.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Mar 2022 10:43:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Unique-Visitors/m-p/2403625#M63023</guid>
      <dc:creator>beaoliv123-_</dc:creator>
      <dc:date>2022-03-21T10:43:57Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic  Unique Visitors</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Unique-Visitors/m-p/2403741#M63031</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;Do you have a FacTable with visitor ID, date of visit and a Visitor lookup dimension table , along with a date table marked as such? That would be ideal for Power BI to answer your question.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What would be the period of increment for evaluation? e.g. Measuring back 28 days in daily increments or weekly increments? I'll paste a couple of images that help show how this type of analysis is best set up. You could have at least a Date and Customer dimension table (you may already but not evident from question)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;This input helps the measure figure what you consider as lost or new and returning.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;If you don't have all this, below is Jeffery Wang's (inventor of DAX) measure for new customers(vistors):&lt;/P&gt;&lt;P&gt;New Cust = vcustomersthis period = VALUES(Sales[CustKey])&lt;BR /&gt;var vfirstdatethisperiod = MIN(Sales[orderdate])&lt;BR /&gt;var vcustomersbefore = CALCULATETABLE(VALUES(Sales[custkey],&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;FILTER(ALL(Sales[orderdate]), [orderdate] &amp;lt; vfirstdatethisperiod, ALL(DATES))&lt;BR /&gt;return&lt;/P&gt;&lt;P&gt;COUNTROWS(EXCEPT(vcustomersthisperiod, vcustomersbefore))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With this measure if you have day in the visual column it will be based on day. If you have week, then it's week based and so on.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Mar 2022 17:01:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Unique-Visitors/m-p/2403741#M63031</guid>
      <dc:creator>Whitewater100</dc:creator>
      <dc:date>2022-03-18T17:01:11Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic  Unique Visitors</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Unique-Visitors/m-p/2406454#M63200</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;thanks for your help. I have a table with the customers ID and a Date table.&lt;/P&gt;&lt;P&gt;My goal is to change the way it calculates the unique visitors, based on the date filter. For example, if I select a week on the slicer, the calculation for the unique visitors considers 1 week, and the same for other selections.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Mar 2022 10:41:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Unique-Visitors/m-p/2406454#M63200</guid>
      <dc:creator>beaoliv123-_</dc:creator>
      <dc:date>2022-03-21T10:41:19Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic  Unique Visitors</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Unique-Visitors/m-p/2407070#M63253</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;Do you think you could make up some sample data for the tables? The way your model is set up and relationships determines the calculation. If it looks like this (below) I could probably try to create mock data.&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;</description>
      <pubDate>Mon, 21 Mar 2022 15:49:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Unique-Visitors/m-p/2407070#M63253</guid>
      <dc:creator>Whitewater100</dc:creator>
      <dc:date>2022-03-21T15:49:44Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic  Unique Visitors</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Unique-Visitors/m-p/2407091#M63255</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Table1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Date&lt;BR /&gt;User ID (each time a user comes in, the user ID appears)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table2&lt;/STRONG&gt;&lt;BR /&gt;Year&lt;BR /&gt;Quarter&lt;BR /&gt;Month&lt;BR /&gt;Day&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My goal is to calculate the distinct user ID, but this measure must be dynamic with the date.&lt;/P&gt;&lt;P&gt;Ex.:&lt;BR /&gt;If I select a date between last week and today, then it will count each user ID once between these two dates. And depending on the date selection, I want the distinct count to change.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Mar 2022 16:00:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Unique-Visitors/m-p/2407091#M63255</guid>
      <dc:creator>beaoliv123-_</dc:creator>
      <dc:date>2022-03-21T16:00:49Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic  Unique Visitors</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Unique-Visitors/m-p/2407221#M63263</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;I understand. I will make up some data to experiment with but only can look at it a bit later today. Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 21 Mar 2022 16:54:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Unique-Visitors/m-p/2407221#M63263</guid>
      <dc:creator>Whitewater100</dc:creator>
      <dc:date>2022-03-21T16:54:08Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic  Unique Visitors</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Unique-Visitors/m-p/2407898#M63298</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;Is this wha you are thinking? Hope it helps..&lt;A title="Customers CT" href="https://drive.google.com/file/d/17_70PbE-6yGY0EtH3G8_cEF_iukgSM0C/view?usp=sharing" target="_self"&gt;https://drive.google.com/file/d/17_70PbE-6yGY0EtH3G8_cEF_iukgSM0C/view?usp=sharing&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2022 00:56:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Unique-Visitors/m-p/2407898#M63298</guid>
      <dc:creator>Whitewater100</dc:creator>
      <dc:date>2022-03-22T00:56:28Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic  Unique Visitors</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Unique-Visitors/m-p/2414326#M63713</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="368944" data-lia-user-login="beaoliv123-_" class="lia-mention lia-mention-user"&gt;beaoliv123-_&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may firstly refer to&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="179903" data-lia-user-login="Whitewater100" class="lia-mention lia-mention-user"&gt;Whitewater100&lt;/a&gt;&amp;nbsp;'s pbix.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And I have created a data sample to test:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;And use CALENDAR() to create a Date table for slicer:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;For Slicer = CALENDAR(MIN('Table'[Date]),MAX('Table'[Date]))&lt;/LI-CODE&gt;
&lt;P&gt;Then create a measure:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Count of Unique Users = CALCULATE(DISTINCTCOUNT('Table'[User ID]),FILTER('Table',[Date]&amp;gt;=MIN('For Slicer'[Date]) &amp;amp;&amp;amp; [Date]&amp;lt;=MAX('For Slicer'[Date])))&lt;/LI-CODE&gt;
&lt;P&gt;Output:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Eyelyn Qin&lt;BR /&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 07:48:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Unique-Visitors/m-p/2414326#M63713</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-03-24T07:48:55Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic  Unique Visitors</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Unique-Visitors/m-p/2415304#M63787</link>
      <description>&lt;P&gt;Thank you all for your answers, you realy helped me solve the question.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 14:15:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Unique-Visitors/m-p/2415304#M63787</guid>
      <dc:creator>beaoliv123-_</dc:creator>
      <dc:date>2022-03-24T14:15:17Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic  Unique Visitors</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Unique-Visitors/m-p/2415351#M63788</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;What didn't work on my previous solution? I understood you wanted to compare unique visitors..&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 14:33:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Unique-Visitors/m-p/2415351#M63788</guid>
      <dc:creator>Whitewater100</dc:creator>
      <dc:date>2022-03-24T14:33:48Z</dc:date>
    </item>
  </channel>
</rss>

