<?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: Calculate percentile between tables in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-percentile-between-tables/m-p/4769308#M182657</link>
    <description>&lt;P&gt;Hi atorliga,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;We are following up to see if your query has been resolved. Should you have identified a solution, we kindly request you to share it with the community to assist others facing similar issues.&lt;/P&gt;
&lt;P&gt;If our response was helpful, please mark it as the accepted solution, as this helps the broader community.&lt;BR /&gt;Should you have any further queries, kindly feel free to contact the Microsoft Fabric community.&lt;BR /&gt;&lt;BR /&gt;Thank you.&lt;/P&gt;</description>
    <pubDate>Sat, 19 Jul 2025 17:32:08 GMT</pubDate>
    <dc:creator>v-pnaroju-msft</dc:creator>
    <dc:date>2025-07-19T17:32:08Z</dc:date>
    <item>
      <title>Calculate percentile between tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-percentile-between-tables/m-p/4758608#M182220</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I have two related tables in my Power BI model:&lt;/P&gt;&lt;H3&gt;&lt;span class="lia-unicode-emoji" title=":file_folder:"&gt;📁&lt;/span&gt; Table 1: "Reportes uso ChatGPT"&lt;/H3&gt;&lt;P&gt;Contains usage data per employee:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;"Fecha" (Date in dd/mm/yyyy, representing the month)&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;"email" (employee's corporate email)&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;"messages" (number of ChatGPT iterations that user performed in that month)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":right_arrow:"&gt;➡️&lt;/span&gt; A user can appear multiple times (one row per month of usage).&lt;/P&gt;&lt;HR /&gt;&lt;H3&gt;&lt;span class="lia-unicode-emoji" title=":file_folder:"&gt;📁&lt;/span&gt; Table 2: "Datos demográficos"&lt;/H3&gt;&lt;P&gt;Contains unique employee information:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;"ID" (employee identifier)&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;"Dirección email trabajo" (corporate email address)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":right_arrow:"&gt;➡️&lt;/span&gt; This table has &lt;STRONG&gt;one row per employee&lt;/STRONG&gt;.&lt;/P&gt;&lt;HR /&gt;&lt;H3&gt;&lt;span class="lia-unicode-emoji" title=":link:"&gt;🔗&lt;/span&gt; Relationship:&lt;/H3&gt;&lt;P&gt;There's a &lt;STRONG&gt;one-to-many&lt;/STRONG&gt; relationship:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;From "Datos demográficos"[Dirección email trabajo]&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;To "Reportes uso ChatGPT"[email]&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;HR /&gt;&lt;H3&gt;&lt;span class="lia-unicode-emoji" title=":white_heavy_check_mark:"&gt;✅&lt;/span&gt; What I need:&lt;/H3&gt;&lt;P&gt;I want to create a DAX measure that calculates the &lt;STRONG&gt;percentile of each employee&lt;/STRONG&gt; based on their &lt;STRONG&gt;total ChatGPT usage (messages)&lt;/STRONG&gt;, across &lt;STRONG&gt;all employees in the company&lt;/STRONG&gt;, including those who:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;have no usage at all,&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;have never appeared in the usage table,&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;or have zero messages.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;The idea is that:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;Employees with &lt;STRONG&gt;more messages&lt;/STRONG&gt; get a &lt;STRONG&gt;higher percentile&lt;/STRONG&gt; (100% = highest usage),&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Employees with &lt;STRONG&gt;less or no usage&lt;/STRONG&gt; get lower percentiles (down to 0% = no usage).&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;HR /&gt;&lt;H3&gt;&lt;span class="lia-unicode-emoji" title=":light_bulb:"&gt;💡&lt;/span&gt; Ideally:&lt;/H3&gt;&lt;P&gt;I’d like to do it in separate DAX measures so I can use it for other measures:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;Total messages per employee&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Ranking among all employees (based on total messages)&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Percentile normalized between 0 and 100&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;HR /&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":pushpin:"&gt;📌&lt;/span&gt; &lt;STRONG&gt;Note&lt;/STRONG&gt;: I'm open to using TREATAS, RANKX, or virtual tables (ADDCOLUMNS, SUMMARIZE, etc.) if necessary.&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;Any ideas or recommended approach to achieve this?&lt;/P&gt;&lt;P&gt;Thanks in advance! &lt;span class="lia-unicode-emoji" title=":folded_hands:"&gt;🙏&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jul 2025 07:56:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-percentile-between-tables/m-p/4758608#M182220</guid>
      <dc:creator>atorliga</dc:creator>
      <dc:date>2025-07-10T07:56:13Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate percentile between tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-percentile-between-tables/m-p/4758710#M182225</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1306131" data-lia-user-login="atorliga" class="lia-mention lia-mention-user"&gt;atorliga&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DAX&lt;BR /&gt;TotalMessagesPerEmployee = &lt;BR /&gt;CALCULATE(&lt;BR /&gt;SUM('Reportes uso ChatGPT'[messages]),&lt;BR /&gt;ALLEXCEPT('Reportes uso ChatGPT', 'Reportes uso ChatGPT'[email])&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DAX&lt;BR /&gt;EmployeeRank = &lt;BR /&gt;RANKX(&lt;BR /&gt;ALL('Datos demográficos'),&lt;BR /&gt;[TotalMessagesPerEmployee],&lt;BR /&gt;,&lt;BR /&gt;DESC,&lt;BR /&gt;DENSE&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DAX&lt;BR /&gt;EmployeePercentile = &lt;BR /&gt;VAR TotalEmployees = COUNTROWS(ALL('Datos demográficos'))&lt;BR /&gt;VAR EmployeeRank = [EmployeeRank]&lt;BR /&gt;RETURN&lt;BR /&gt;DIVIDE(EmployeeRank - 1, TotalEmployees - 1, 0) * 100&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jul 2025 09:26:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-percentile-between-tables/m-p/4758710#M182225</guid>
      <dc:creator>bhanu_gautam</dc:creator>
      <dc:date>2025-07-10T09:26:38Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate percentile between tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-percentile-between-tables/m-p/4758780#M182228</link>
      <description>&lt;P&gt;Thanks a lot for the help so far — really appreciate the guidance!&lt;/P&gt;&lt;P&gt;I just want to clarify the full requirement to make sure the DAX solution is aligned with my scenario:&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":heavy_check_mark:"&gt;✔️&lt;/span&gt; I have a full list of employees in a table called 'Datos demográficos'.&lt;BR /&gt;Some of them &lt;STRONG&gt;do not have a ChatGPT license&lt;/STRONG&gt;, and therefore &lt;STRONG&gt;do not appear at all&lt;/STRONG&gt; in the usage table 'Reportes uso ChatGPT'.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":heavy_check_mark:"&gt;✔️&lt;/span&gt; Still, I need &lt;STRONG&gt;all employees&lt;/STRONG&gt; — including those &lt;STRONG&gt;with no usage data&lt;/STRONG&gt; — to appear in the calculation of percentiles:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;Ideally with a 0 or BLANK() message count,&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;And placed at the &lt;STRONG&gt;bottom of the ranking&lt;/STRONG&gt;, corresponding to the &lt;STRONG&gt;lowest percentiles (0 %)&lt;/STRONG&gt;.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":heavy_check_mark:"&gt;✔️&lt;/span&gt; In addition, I want this to work dynamically with &lt;STRONG&gt;time-based filters&lt;/STRONG&gt;:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;If I use a &lt;STRONG&gt;slicer for a specific month&lt;/STRONG&gt;, the total messages should reflect only that month.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;The percentile must then rank employees &lt;STRONG&gt;based on usage in that period&lt;/STRONG&gt;, but &lt;STRONG&gt;still include all employees&lt;/STRONG&gt;, even those who had no activity that month.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;HR /&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":bar_chart:"&gt;📊&lt;/span&gt; Goal:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;A dynamic, context-aware percentile measure for each employee&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Based on their total messages (per current filter context)&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Over the full employee base from 'Datos demográficos'&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;That works with date slicers and other filters in the report&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;HR /&gt;&lt;P&gt;Thanks again for the help — any working DAX examples or performance tips would be amazing! &lt;span class="lia-unicode-emoji" title=":folded_hands:"&gt;🙏&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jul 2025 10:19:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-percentile-between-tables/m-p/4758780#M182228</guid>
      <dc:creator>atorliga</dc:creator>
      <dc:date>2025-07-10T10:19:52Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate percentile between tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-percentile-between-tables/m-p/4758831#M182232</link>
      <description>&lt;P&gt;Thankyou,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="625922" data-lia-user-login="bhanu_gautam" class="lia-mention lia-mention-user"&gt;bhanu_gautam&lt;/a&gt;, for your response.&lt;BR /&gt;&lt;BR /&gt;Hi atorliga,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;We appreciate your inquiry shared through the Microsoft Fabric Community Forum.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Based on our understanding of the issue, we have reproduced the scenario using a sample dataset and successfully obtained the expected output. In this output, all employees, including those without usage records, are accurately displayed with Total Messages, Rank, and Percentile Score (ranging from 0 to 100) that responds to slicers like date. We have used a combination of CALCULATE, SELECTEDVALUE, COALESCE, Calendar logic and RANKX functions to achieve this.&lt;/P&gt;
&lt;P&gt;Please find attached a screenshot and a sample PBIX file for your reference:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;We hope that the information provided will assist in resolving the issue.If you find our response helpful, kindly mark it as the accepted solution. This will assist other community members facing similar queries. &lt;BR /&gt;Should you have any further queries, please feel free to reach out to the Microsoft Fabric Community.&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jul 2025 11:06:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-percentile-between-tables/m-p/4758831#M182232</guid>
      <dc:creator>v-pnaroju-msft</dc:creator>
      <dc:date>2025-07-10T11:06:13Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate percentile between tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-percentile-between-tables/m-p/4760926#M182315</link>
      <description>&lt;P&gt;Hi atorliga,&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We would like to follow up and see whether the details we shared have resolved your problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If you need any more assistance, please feel free to connect with the Microsoft Fabric community.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 13 Jul 2025 08:04:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-percentile-between-tables/m-p/4760926#M182315</guid>
      <dc:creator>v-pnaroju-msft</dc:creator>
      <dc:date>2025-07-13T08:04:38Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate percentile between tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-percentile-between-tables/m-p/4765541#M182559</link>
      <description>&lt;P&gt;Hi atorliga,&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We wanted to check in and see if the information we provided helped resolve your issue. If you require further assistance, please don’t hesitate to reach out to the Microsoft Fabric community.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jul 2025 15:06:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-percentile-between-tables/m-p/4765541#M182559</guid>
      <dc:creator>v-pnaroju-msft</dc:creator>
      <dc:date>2025-07-16T15:06:34Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate percentile between tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-percentile-between-tables/m-p/4769308#M182657</link>
      <description>&lt;P&gt;Hi atorliga,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;We are following up to see if your query has been resolved. Should you have identified a solution, we kindly request you to share it with the community to assist others facing similar issues.&lt;/P&gt;
&lt;P&gt;If our response was helpful, please mark it as the accepted solution, as this helps the broader community.&lt;BR /&gt;Should you have any further queries, kindly feel free to contact the Microsoft Fabric community.&lt;BR /&gt;&lt;BR /&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Sat, 19 Jul 2025 17:32:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-percentile-between-tables/m-p/4769308#M182657</guid>
      <dc:creator>v-pnaroju-msft</dc:creator>
      <dc:date>2025-07-19T17:32:08Z</dc:date>
    </item>
  </channel>
</rss>

