<?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: Using Measure in chart axis, or make column instead of measure in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-Measure-in-chart-axis-or-make-column-instead-of-measure/m-p/1329965#M23552</link>
    <description>&lt;P&gt;&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;thanks, these links were very usefull.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have now made a table (called 'quartileMap' with the Quartile texts and the sort-order:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;quartileName&lt;/TD&gt;&lt;TD&gt;sortOrder&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Quartile 1&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Quartile 2&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Quartile 3&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Outliers&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Next, I created a measure:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Test = 
    SWITCH(SELECTEDVALUE(quartileMap[quartileName]),
        "Quartile 1",   COUNTROWS(filter(SUMMARIZE(ALLSELECTED(myTable),[Employee Name],"Quartile",[Quartile]),[Quartile]="Quartile 1")),
        "Quartile 2",   COUNTROWS(filter(SUMMARIZE(ALLSELECTED(myTable),[Employee Name],"Quartile",[Quartile]),[Quartile]="Quartile 2")),
        "Quartile 3",   COUNTROWS(filter(SUMMARIZE(ALLSELECTED(myTable),[Employee Name],"Quartile",[Quartile]),[Quartile]="Quartile 3")),
        "Outliers",     COUNTROWS(filter(SUMMARIZE(ALLSELECTED(myTable),[Employee Name],"Quartile",[Quartile]),[Quartile]="Outliers"))
    )&lt;/LI-CODE&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 can now create a bar graph with the quartileName from the quartileMap table in the Axis, and the Test measure as values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRIKE&gt;Only thing is that the Quartile axis is not sorting by sortOrder, but alphabetically, causing Outliers to appear before Quartile 1, 2, 3. Instead of after Quartile 1, 2, 3. Not sure what the sortOrder does in this table.&lt;/STRIKE&gt; Never mind this last part, I had to select the quartileName column and sort it by sortOrder&lt;/P&gt;</description>
    <pubDate>Thu, 27 Aug 2020 19:19:36 GMT</pubDate>
    <dc:creator>Remco1986</dc:creator>
    <dc:date>2020-08-27T19:19:36Z</dc:date>
    <item>
      <title>Using Measure in chart axis, or make column instead of measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-Measure-in-chart-axis-or-make-column-instead-of-measure/m-p/1327935#M23460</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;after finding some great info on this forum, here's my first topic. My first part of this problem succeeded because of other topics I found, but I'm now running into an issue that I can not solve.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My data-set consists of a table with employees and their coaching data. Based on several columns, I have added a measure to calculate the 'Pass Rate'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have created a measure that will calculate the percentiles for 25, 50 and 75, and then returns a text for whatever wuartile their pass rate falls in:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Quartile = 
    var p25 = PERCENTILEX.INC(SUMMARIZE(ALLSELECTED(myTable,[Employee Name],"Pass Rate",[(%) Pass Rate]),[Pass Rate],0.25)
    var p50 = PERCENTILEX.INC(SUMMARIZE(ALLSELECTED(myTable),[Employee Name],"Pass Rate",[(%) Pass Rate]),[Pass Rate],0.5)
    var p75 = PERCENTILEX.INC(SUMMARIZE(ALLSELECTED(myTable),[Employee Name],"Pass Rate",[(%) Pass Rate]),[Pass Rate],0.75)
    return IF([(%) Pass Rate]&amp;gt;=p75,"Quartile 1",IF([(%) Pass Rate]&amp;gt;=p50,"Quartile 2",IF([(%) Pass Rate]&amp;gt;=p25,"Quartile 3","Outliers")))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This was a personal break-through after several nights of reading and trying. I now have a nice table like:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;Employee Name&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;(%) Pass Rate&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Quartile&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Emp1&lt;/TD&gt;&lt;TD&gt;100%&lt;/TD&gt;&lt;TD&gt;Quartile 1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Emp2&lt;/TD&gt;&lt;TD&gt;90%&lt;/TD&gt;&lt;TD&gt;Quartile 2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Emp3&lt;/TD&gt;&lt;TD&gt;30%&lt;/TD&gt;&lt;TD&gt;Outliers&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Next step is to create a small graph with the count of employees per Quartile, however. I can not use my Quartile measure in the Axis part of the graph. I tried to use the same calculation but now as a Column instead of a measure, this results in the graph only displaying 'Quartile 2', probably because it's not yet grouped by Employee Name?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also tried to create a column like so:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Quartile_text = switch([QuartileNumber],1,"1",2,"2",3,"3",4,"4")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;but this also returns only "2"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What would be the approach to get a 'Quartile Text' column/measure that I can use in a graph Axis, that shows all Quartiles that are also in the 'Employee Table'?&lt;/P&gt;</description>
      <pubDate>Thu, 27 Aug 2020 07:02:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-Measure-in-chart-axis-or-make-column-instead-of-measure/m-p/1327935#M23460</guid>
      <dc:creator>Remco1986</dc:creator>
      <dc:date>2020-08-27T07:02:08Z</dc:date>
    </item>
    <item>
      <title>Re: Using Measure in chart axis, or make column instead of measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-Measure-in-chart-axis-or-make-column-instead-of-measure/m-p/1328028#M23467</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="255401" data-lia-user-login="Remco1986" class="lia-mention lia-mention-user"&gt;Remco1986&lt;/a&gt; , refer if these can help&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blog.enterprisedna.co/implementing-80-20-logic-in-your-power-bi-analysis/" target="_blank"&gt;https://blog.enterprisedna.co/implementing-80-20-logic-in-your-power-bi-analysis/&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://forum.enterprisedna.co/t/testing-the-pareto-principle-80-20-rule-in-power-bi-w-dax/459" target="_blank"&gt;https://forum.enterprisedna.co/t/testing-the-pareto-principle-80-20-rule-in-power-bi-w-dax/459&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://finance-bi.com/power-bi-pareto-analysis/" target="_blank"&gt;https://finance-bi.com/power-bi-pareto-analysis/&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/DAX-Commands-and-Tips/Calculate-the-sum-of-the-top-80/td-p/763156" target="_blank"&gt;https://community.powerbi.com/t5/DAX-Commands-and-Tips/Calculate-the-sum-of-the-top-80/td-p/763156&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Aug 2020 07:34:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-Measure-in-chart-axis-or-make-column-instead-of-measure/m-p/1328028#M23467</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2020-08-27T07:34:03Z</dc:date>
    </item>
    <item>
      <title>Re: Using Measure in chart axis, or make column instead of measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-Measure-in-chart-axis-or-make-column-instead-of-measure/m-p/1328886#M23501</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="255401" data-lia-user-login="Remco1986" class="lia-mention lia-mention-user"&gt;Remco1986&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a very nice article on how you can use a measure as an axis:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://radacad.com/dax-measure-in-the-axis-of-the-power-bi-report" target="_blank"&gt;https://radacad.com/dax-measure-in-the-axis-of-the-power-bi-report&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Pragati&lt;/P&gt;</description>
      <pubDate>Thu, 27 Aug 2020 12:22:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-Measure-in-chart-axis-or-make-column-instead-of-measure/m-p/1328886#M23501</guid>
      <dc:creator>Pragati11</dc:creator>
      <dc:date>2020-08-27T12:22:48Z</dc:date>
    </item>
    <item>
      <title>Re: Using Measure in chart axis, or make column instead of measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-Measure-in-chart-axis-or-make-column-instead-of-measure/m-p/1329965#M23552</link>
      <description>&lt;P&gt;&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;thanks, these links were very usefull.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have now made a table (called 'quartileMap' with the Quartile texts and the sort-order:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;quartileName&lt;/TD&gt;&lt;TD&gt;sortOrder&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Quartile 1&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Quartile 2&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Quartile 3&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Outliers&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Next, I created a measure:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Test = 
    SWITCH(SELECTEDVALUE(quartileMap[quartileName]),
        "Quartile 1",   COUNTROWS(filter(SUMMARIZE(ALLSELECTED(myTable),[Employee Name],"Quartile",[Quartile]),[Quartile]="Quartile 1")),
        "Quartile 2",   COUNTROWS(filter(SUMMARIZE(ALLSELECTED(myTable),[Employee Name],"Quartile",[Quartile]),[Quartile]="Quartile 2")),
        "Quartile 3",   COUNTROWS(filter(SUMMARIZE(ALLSELECTED(myTable),[Employee Name],"Quartile",[Quartile]),[Quartile]="Quartile 3")),
        "Outliers",     COUNTROWS(filter(SUMMARIZE(ALLSELECTED(myTable),[Employee Name],"Quartile",[Quartile]),[Quartile]="Outliers"))
    )&lt;/LI-CODE&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 can now create a bar graph with the quartileName from the quartileMap table in the Axis, and the Test measure as values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRIKE&gt;Only thing is that the Quartile axis is not sorting by sortOrder, but alphabetically, causing Outliers to appear before Quartile 1, 2, 3. Instead of after Quartile 1, 2, 3. Not sure what the sortOrder does in this table.&lt;/STRIKE&gt; Never mind this last part, I had to select the quartileName column and sort it by sortOrder&lt;/P&gt;</description>
      <pubDate>Thu, 27 Aug 2020 19:19:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-Measure-in-chart-axis-or-make-column-instead-of-measure/m-p/1329965#M23552</guid>
      <dc:creator>Remco1986</dc:creator>
      <dc:date>2020-08-27T19:19:36Z</dc:date>
    </item>
  </channel>
</rss>

