<?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 cumulative number of sessions per unique user. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-cumulative-number-of-sessions-per-unique-user/m-p/2664157#M79096</link>
    <description>&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;HI&amp;nbsp;Anonymous&lt;/LI-USER&gt;,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Did you mean to get the calculated result that aggregated based on particular field groups without adding them to the current table visual?&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;If that is the case, you can try to create a variable with summarize function to group current records with specific fields. After these, you can use the iterator function to aggregate these summarized results.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;&lt;A href="https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907" target="_self"&gt;Measure Totals, The Final Word&lt;/A&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;formula1 =
VAR summary =
    SUMMARIZE (
        ALLSELECTED ( Table ),
        [Year],
        [Month],
        [User id],
        "Session Count", COUNT ( Table[Session] )
    )
RETURN
    SUMX ( summary, [Session Count] )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;For the second visual effect, you need a new parameter table with number fields to use as the axis. Then you can use the following measure formula to show the results based on the 'user count' that calculates by date ranges:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;formula2 =
VAR currNumber =
    MAX ( NewTable[Number] )
VAR summary =
    GROUPBY (
        SUMMARIZE (
            Table,
            [Year],
            [Month],
            [User id],
            "Session Count", COUNT ( Table[Session] )
        ),
        [Session Count],
        "User Count", COUNTX ( CURRENTGROUP (), [User id] )
    )
RETURN
    MAXX ( FILTER ( summary, [User Count] = currNumber ), [Session Count] )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Regards,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Xiaoxin Sheng&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 27 Jul 2022 08:08:25 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-07-27T08:08:25Z</dc:date>
    <item>
      <title>Calculating cumulative number of sessions per unique user.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-cumulative-number-of-sessions-per-unique-user/m-p/2607016#M75503</link>
      <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;This is what my data looks like:&lt;/P&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have unique user IDs, and the number of sessions for that ID on a given date.&lt;/P&gt;&lt;P&gt;Now i want to create a basic line chart which can show the cumulative number of sessions per unique user.&lt;/P&gt;&lt;P&gt;And a distribution of all the unique users as per the number of sessions they have had.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 28 Jun 2022 13:13:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-cumulative-number-of-sessions-per-unique-user/m-p/2607016#M75503</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-28T13:13:45Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating cumulative number of sessions per unique user.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-cumulative-number-of-sessions-per-unique-user/m-p/2607278#M75513</link>
      <description>&lt;P&gt;I would like to explain this query a bit further. For example, this is my sample data:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Now out of this data, i need to see the following:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Unique User Count&lt;/TD&gt;&lt;TD&gt;Total Sessions&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;17&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;12&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;And also this data across any selected time period:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp; , would really appreciate your support.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2022 00:15:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-cumulative-number-of-sessions-per-unique-user/m-p/2607278#M75513</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-29T00:15:25Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating cumulative number of sessions per unique user.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-cumulative-number-of-sessions-per-unique-user/m-p/2613025#M75840</link>
      <description>&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;HI&amp;nbsp;Anonymous&lt;/a&gt;,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;In fact, I think you can use the default visual aggregate feature to achieve your requirement.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;You can create a table visual with the date(switch to hierarchy mode and keep year, and month levels), add the 'user id' field with aggregate mode 'distinct count', and add the session field with 'count' mode.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;&lt;A href="https://docs.microsoft.com/en-us/power-bi/create-reports/service-aggregates?tabs=powerbi-desktop" target="_blank"&gt;Work with aggregates (sum, average, and so on) in Power BI - Power BI | Microsoft Docs&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Regards,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Xiaoxin Sheng&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jul 2022 01:08:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-cumulative-number-of-sessions-per-unique-user/m-p/2613025#M75840</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-07-01T01:08:46Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating cumulative number of sessions per unique user.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-cumulative-number-of-sessions-per-unique-user/m-p/2613458#M75863</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your response. but this does not really give me what i need.&lt;/P&gt;&lt;P&gt;I can see aggregated data for all users:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I have managed to 'Group by' user ID, to get what i want, but i have to remove the date column, otherwise, i dont get the sum of sessions by user ID. I still need to add the date somehow.&lt;/P&gt;&lt;P&gt;This is what i have so far:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jul 2022 06:53:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-cumulative-number-of-sessions-per-unique-user/m-p/2613458#M75863</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-07-01T06:53:01Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating cumulative number of sessions per unique user.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-cumulative-number-of-sessions-per-unique-user/m-p/2664157#M79096</link>
      <description>&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;HI&amp;nbsp;Anonymous&lt;/a&gt;,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Did you mean to get the calculated result that aggregated based on particular field groups without adding them to the current table visual?&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;If that is the case, you can try to create a variable with summarize function to group current records with specific fields. After these, you can use the iterator function to aggregate these summarized results.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;&lt;A href="https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907" target="_self"&gt;Measure Totals, The Final Word&lt;/A&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;formula1 =
VAR summary =
    SUMMARIZE (
        ALLSELECTED ( Table ),
        [Year],
        [Month],
        [User id],
        "Session Count", COUNT ( Table[Session] )
    )
RETURN
    SUMX ( summary, [Session Count] )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;For the second visual effect, you need a new parameter table with number fields to use as the axis. Then you can use the following measure formula to show the results based on the 'user count' that calculates by date ranges:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;formula2 =
VAR currNumber =
    MAX ( NewTable[Number] )
VAR summary =
    GROUPBY (
        SUMMARIZE (
            Table,
            [Year],
            [Month],
            [User id],
            "Session Count", COUNT ( Table[Session] )
        ),
        [Session Count],
        "User Count", COUNTX ( CURRENTGROUP (), [User id] )
    )
RETURN
    MAXX ( FILTER ( summary, [User Count] = currNumber ), [Session Count] )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Regards,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Xiaoxin Sheng&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 08:08:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-cumulative-number-of-sessions-per-unique-user/m-p/2664157#M79096</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-07-27T08:08:25Z</dc:date>
    </item>
  </channel>
</rss>

