<?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: Help: Struggling with DAX to show Quartile Position in a table in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-Struggling-with-DAX-to-show-Quartile-Position-in-a-table/m-p/4394411#M174458</link>
    <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;, thanks for the reply. Ive included two links below, 1 for some dummy data and 1 for a pbix file that should show the issue &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&amp;nbsp;The original DAX works when I remove all filters. The problem seems to occur when filters are applied. There are two tables in the attached pbix that will show what I mean...Thanks again everyone &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Link 1: dummy data&amp;nbsp;&lt;A href="https://uniofnottm-my.sharepoint.com/:x:/g/personal/mark_dean_nottingham_ac_uk/ETB6XjtL-MZGhhMQDv9OHLIBg1tmy7sFrpGtUfVSE9kOnw?e=2Loezs" target="_blank"&gt;MarkDummyData.xlsx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Link 2: pbix&amp;nbsp;&lt;A href="https://uniofnottm-my.sharepoint.com/:u:/g/personal/mark_dean_nottingham_ac_uk/EbVSjKuhBpFGrEYwiLWYJbQBkcaDR0w0-nJrn4i4Y3NeDA?e=qkmoJn" target="_blank"&gt;Showing Quartiles Dummy Data.pbix&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 04 Feb 2025 12:51:59 GMT</pubDate>
    <dc:creator>markdean</dc:creator>
    <dc:date>2025-02-04T12:51:59Z</dc:date>
    <item>
      <title>Help: Struggling with DAX to show Quartile Position in a table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-Struggling-with-DAX-to-show-Quartile-Position-in-a-table/m-p/4392323#M174363</link>
      <description>&lt;P&gt;Hi all - I am hoping someone can help me write a DAX measure to show 'Quartile Position' within a table. This is where I'm at...&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;This is the DAX I've written so far:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;Quartile =&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;VAR SelectedUnit =&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp; &amp;nbsp; CALCULATE ( 'MASTER_DATASET'[RANK])&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;VAR p25 =&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp; &amp;nbsp; PERCENTILEX.INC (&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ALLSELECTED ( 'MASTER_DATASET'[Institution Name] ),&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CALCULATE ( [RANK] ),&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.25&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp; &amp;nbsp; )&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;VAR p50 =&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp; &amp;nbsp; PERCENTILEX.INC (&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ALLSELECTED ( 'MASTER_DATASET'[Institution Name] ),&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CALCULATE ( [RANK] ),&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.5&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp; &amp;nbsp; )&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;VAR p75 =&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp; &amp;nbsp; PERCENTILEX.INC (&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ALLSELECTED ( 'MASTER_DATASET'[Institution Name] ),&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CALCULATE ( [RANK] ),&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.75&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp; &amp;nbsp; )&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;RETURN&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp; &amp;nbsp; SWITCH (&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;ISFILTERED('MASTER_DATASET'[Institution Name]),&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SelectedUnit &amp;lt;= p25, "Q1",&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SelectedUnit &amp;gt; p25 &amp;amp;&amp;amp; selectedunit &amp;lt;=p50, "Q2",&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; selectedunit &amp;gt; p50 &amp;amp;&amp;amp; SelectedUnit &amp;lt;= p75, "Q3",&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "Q4"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp; &amp;nbsp; )&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;It's the first time I've ever tried to show quartile position in a table so I'm struggling to work out how to resolve this, hence the plea for help! If anyone knows what tweaks I need to make to the above DAX to get this to work, then I'd really appreciate the input and advice. Thanks in advance - Mark &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2025 10:51:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-Struggling-with-DAX-to-show-Quartile-Position-in-a-table/m-p/4392323#M174363</guid>
      <dc:creator>markdean</dc:creator>
      <dc:date>2025-02-03T10:51:32Z</dc:date>
    </item>
    <item>
      <title>Re: Help: Struggling with DAX to show Quartile Position in a table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-Struggling-with-DAX-to-show-Quartile-Position-in-a-table/m-p/4392328#M174364</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="361733" data-lia-user-login="markdean" class="lia-mention lia-mention-user"&gt;markdean&lt;/a&gt;&amp;nbsp;, Try using&lt;/P&gt;
&lt;P&gt;DAX&lt;BR /&gt;Quartile =&lt;BR /&gt;VAR SelectedUnit =&lt;BR /&gt;CALCULATE ( 'MASTER_DATASET'[RANK] )&lt;BR /&gt;VAR p25 =&lt;BR /&gt;PERCENTILEX.INC (&lt;BR /&gt;ALLSELECTED ( 'MASTER_DATASET'[Institution Name] ),&lt;BR /&gt;CALCULATE ( [RANK] ),&lt;BR /&gt;0.25&lt;BR /&gt;)&lt;BR /&gt;VAR p50 =&lt;BR /&gt;PERCENTILEX.INC (&lt;BR /&gt;ALLSELECTED ( 'MASTER_DATASET'[Institution Name] ),&lt;BR /&gt;CALCULATE ( [RANK] ),&lt;BR /&gt;0.5&lt;BR /&gt;)&lt;BR /&gt;VAR p75 =&lt;BR /&gt;PERCENTILEX.INC (&lt;BR /&gt;ALLSELECTED ( 'MASTER_DATASET'[Institution Name] ),&lt;BR /&gt;CALCULATE ( [RANK] ),&lt;BR /&gt;0.75&lt;BR /&gt;)&lt;BR /&gt;RETURN&lt;BR /&gt;SWITCH (&lt;BR /&gt;TRUE(),&lt;BR /&gt;SelectedUnit &amp;lt;= p25, "Q1",&lt;BR /&gt;SelectedUnit &amp;gt; p25 &amp;amp;&amp;amp; SelectedUnit &amp;lt;= p50, "Q2",&lt;BR /&gt;SelectedUnit &amp;gt; p50 &amp;amp;&amp;amp; SelectedUnit &amp;lt;= p75, "Q3",&lt;BR /&gt;"Q4"&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2025 10:53:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-Struggling-with-DAX-to-show-Quartile-Position-in-a-table/m-p/4392328#M174364</guid>
      <dc:creator>bhanu_gautam</dc:creator>
      <dc:date>2025-02-03T10:53:38Z</dc:date>
    </item>
    <item>
      <title>Re: Help: Struggling with DAX to show Quartile Position in a table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-Struggling-with-DAX-to-show-Quartile-Position-in-a-table/m-p/4392466#M174369</link>
      <description>&lt;P&gt;Hi&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;&amp;nbsp;, many thanks for replying and for the suggestion. Sadly, it's still only producing a column of 24 Q1 values and is not returning any Q2, Q3 or Q4 values &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2025 12:38:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-Struggling-with-DAX-to-show-Quartile-Position-in-a-table/m-p/4392466#M174369</guid>
      <dc:creator>markdean</dc:creator>
      <dc:date>2025-02-03T12:38:04Z</dc:date>
    </item>
    <item>
      <title>Re: Help: Struggling with DAX to show Quartile Position in a table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-Struggling-with-DAX-to-show-Quartile-Position-in-a-table/m-p/4393270#M174405</link>
      <description>&lt;P style="margin: 0in; font-family: tahoma; font-size: 11.0pt;"&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="361733" data-lia-user-login="markdean" class="lia-mention lia-mention-user"&gt;markdean&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: tahoma; font-size: 11.0pt;"&gt;Can you please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.&lt;/P&gt;
&lt;P style="margin: 0in; font-family: tahoma; font-size: 11.0pt;"&gt;&lt;A href="http://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank"&gt;How to Get Your Question Answered Quickly&amp;nbsp;&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: tahoma; font-size: 11.0pt;"&gt;Regards,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: tahoma; font-size: 11.0pt;"&gt;Xiaoxin Sheng&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2025 01:34:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-Struggling-with-DAX-to-show-Quartile-Position-in-a-table/m-p/4393270#M174405</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-02-04T01:34:07Z</dc:date>
    </item>
    <item>
      <title>Re: Help: Struggling with DAX to show Quartile Position in a table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-Struggling-with-DAX-to-show-Quartile-Position-in-a-table/m-p/4394411#M174458</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;, thanks for the reply. Ive included two links below, 1 for some dummy data and 1 for a pbix file that should show the issue &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&amp;nbsp;The original DAX works when I remove all filters. The problem seems to occur when filters are applied. There are two tables in the attached pbix that will show what I mean...Thanks again everyone &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Link 1: dummy data&amp;nbsp;&lt;A href="https://uniofnottm-my.sharepoint.com/:x:/g/personal/mark_dean_nottingham_ac_uk/ETB6XjtL-MZGhhMQDv9OHLIBg1tmy7sFrpGtUfVSE9kOnw?e=2Loezs" target="_blank"&gt;MarkDummyData.xlsx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Link 2: pbix&amp;nbsp;&lt;A href="https://uniofnottm-my.sharepoint.com/:u:/g/personal/mark_dean_nottingham_ac_uk/EbVSjKuhBpFGrEYwiLWYJbQBkcaDR0w0-nJrn4i4Y3NeDA?e=qkmoJn" target="_blank"&gt;Showing Quartiles Dummy Data.pbix&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2025 12:51:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-Struggling-with-DAX-to-show-Quartile-Position-in-a-table/m-p/4394411#M174458</guid>
      <dc:creator>markdean</dc:creator>
      <dc:date>2025-02-04T12:51:59Z</dc:date>
    </item>
    <item>
      <title>Re: Help: Struggling with DAX to show Quartile Position in a table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-Struggling-with-DAX-to-show-Quartile-Position-in-a-table/m-p/4395774#M174524</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="361733" data-lia-user-login="markdean" class="lia-mention lia-mention-user"&gt;markdean&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I suppose they may relate to filter effect. If the filter effects applied on these records and only keep records that equal to current 'Institution Name' category, they should return wrong results due to calculation on the wrong ranges.&lt;/P&gt;
&lt;P&gt;For this scenario, you can try to create a variable to stored filtered table records and ranks. Then you can use the max rank from the variable table to compare with current rank and use the result to assign group.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.sqlbi.com/articles/all-the-secrets-of-summarize/" target="_blank"&gt;All the secrets of SUMMARIZE - SQLBI&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Xiaoxin Sheng&lt;/P&gt;</description>
      <pubDate>Wed, 05 Feb 2025 07:20:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-Struggling-with-DAX-to-show-Quartile-Position-in-a-table/m-p/4395774#M174524</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-02-05T07:20:16Z</dc:date>
    </item>
  </channel>
</rss>

