<?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: Grouping Pie Chart values under 2% as &amp;quot;Other&amp;quot; in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouping-Pie-Chart-values-under-2-as-quot-Other-quot/m-p/3471749#M132572</link>
    <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;SPAN&gt;Let's try another approach by creating a measure.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;FlavorPercentage =&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;DIVIDE(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;COUNTROWS(FILTER(FlavorData, FlavorData[Value] = EARLIER(FlavorData[Value]))),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;COUNTROWS(FlavorData)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;) * 100&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Create another measure&amp;nbsp;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;FlavorCategory =&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;IF([FlavorPercentage] &amp;gt;= 2, [Value], "Others")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;These will return "Others" for flavors with less than 2% and the flavor name for those with 2% or more.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Apply filters to the Pie Chart and see the result.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;==========&lt;STRONG&gt;OR try a&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;nother approach&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;FlavorPercentage2 =&lt;BR /&gt;COUNTROWS(FILTER(FlavorData, FlavorData[Value] = EARLIER(FlavorData[Value]))&lt;BR /&gt;) / COUNTROWS(FlavorData)&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Drag a "Bar Chart" or "Column Chart" visualization to the canvas.&lt;BR /&gt;Add the "Value" field to the "Axis" or "Category" field well.&lt;BR /&gt;Add the "FlavorPercentage" measure to the "Values" field well.&lt;/P&gt;&lt;P&gt;You may want to customize the chart to make it more readable:&lt;/P&gt;&lt;P&gt;Sort the chart by percentage.&lt;BR /&gt;Adjust the axis labels and formatting.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;================ &lt;STRONG&gt;OR try&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Grouped Value = IF(SUM('Table'[flavor_ratio]) / SUMX(ALL('Table'), 'Table'[flavor_ratio]) &amp;lt; 0.02, "Others", MAX('Table'[Value]))&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Reference&amp;nbsp; :&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-grouping-and-binning" target="_blank" rel="noopener"&gt;https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-grouping-and-binning&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 11 Oct 2023 16:52:45 GMT</pubDate>
    <dc:creator>DallasBaba</dc:creator>
    <dc:date>2023-10-11T16:52:45Z</dc:date>
    <item>
      <title>Grouping Pie Chart values under 2% as "Other"</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouping-Pie-Chart-values-under-2-as-quot-Other-quot/m-p/3468539#M132406</link>
      <description>&lt;P&gt;So my data looks something like this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;flavor_ratio&lt;/TD&gt;&lt;TD&gt;Value&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;meat&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;chicken&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;TD&gt;veggies&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;chicken&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;9&lt;/TD&gt;&lt;TD&gt;meat&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But of course, it goes for thousands of rows. Now when I want to visualise a pie chart, it would look something like this:&lt;/P&gt;&lt;P&gt;Meat 98%, veggies 1% and chicken 1%. I need it like this: Meat 98%, Others 2%. Basically everything under 2% should be grouped under others. How can I achieve this? I need it to respect any filters that I am applying as well.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2023 10:27:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouping-Pie-Chart-values-under-2-as-quot-Other-quot/m-p/3468539#M132406</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-10-10T10:27:46Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping Pie Chart values under 2% as "Other"</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouping-Pie-Chart-values-under-2-as-quot-Other-quot/m-p/3469625#M132460</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;can you create a new column&amp;nbsp;&amp;nbsp;Percentage = DIVIDE([flavor_ratio], SUMX(TableName, [flavor_ratio])) * 100&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Create another calculated column to group values under 2% as "Others."&lt;BR /&gt;Grouped Value = IF([Percentage] &amp;lt; 2, "Others", [Value])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;create a pie chart visual.&lt;BR /&gt;Drag the "Grouped Value" column to the "Values" field well of the pie chart.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;You can also drag the "Percentage" column to the "Values" field to display the percentages on the chart.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With these steps, your pie chart should display "Meat," "Chicken," and "Others" as categories based on the percentage threshold of 2%.&amp;nbsp;This chart will also respect any filters you apply to your data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can customize your chart as needed, adding labels, titles, and legends to make it more informative.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let me know if this work&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2023 19:19:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouping-Pie-Chart-values-under-2-as-quot-Other-quot/m-p/3469625#M132460</guid>
      <dc:creator>DallasBaba</dc:creator>
      <dc:date>2023-10-10T19:19:24Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping Pie Chart values under 2% as "Other"</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouping-Pie-Chart-values-under-2-as-quot-Other-quot/m-p/3471024#M132530</link>
      <description>&lt;P&gt;Hi dallasbabatunde,&amp;nbsp;&lt;BR /&gt;Thank you so much for this but I tried this already and it just gives me 100% others. I should note that most flavor ratios that i have are indeed below 1, like 0.something. So the new calculated column just shows others for all calculations.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2023 11:20:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouping-Pie-Chart-values-under-2-as-quot-Other-quot/m-p/3471024#M132530</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-10-11T11:20:13Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping Pie Chart values under 2% as "Other"</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouping-Pie-Chart-values-under-2-as-quot-Other-quot/m-p/3471749#M132572</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;SPAN&gt;Let's try another approach by creating a measure.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;FlavorPercentage =&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;DIVIDE(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;COUNTROWS(FILTER(FlavorData, FlavorData[Value] = EARLIER(FlavorData[Value]))),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;COUNTROWS(FlavorData)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;) * 100&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Create another measure&amp;nbsp;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;FlavorCategory =&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;IF([FlavorPercentage] &amp;gt;= 2, [Value], "Others")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;These will return "Others" for flavors with less than 2% and the flavor name for those with 2% or more.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Apply filters to the Pie Chart and see the result.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;==========&lt;STRONG&gt;OR try a&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;nother approach&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;FlavorPercentage2 =&lt;BR /&gt;COUNTROWS(FILTER(FlavorData, FlavorData[Value] = EARLIER(FlavorData[Value]))&lt;BR /&gt;) / COUNTROWS(FlavorData)&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Drag a "Bar Chart" or "Column Chart" visualization to the canvas.&lt;BR /&gt;Add the "Value" field to the "Axis" or "Category" field well.&lt;BR /&gt;Add the "FlavorPercentage" measure to the "Values" field well.&lt;/P&gt;&lt;P&gt;You may want to customize the chart to make it more readable:&lt;/P&gt;&lt;P&gt;Sort the chart by percentage.&lt;BR /&gt;Adjust the axis labels and formatting.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;================ &lt;STRONG&gt;OR try&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Grouped Value = IF(SUM('Table'[flavor_ratio]) / SUMX(ALL('Table'), 'Table'[flavor_ratio]) &amp;lt; 0.02, "Others", MAX('Table'[Value]))&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Reference&amp;nbsp; :&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-grouping-and-binning" target="_blank" rel="noopener"&gt;https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-grouping-and-binning&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2023 16:52:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouping-Pie-Chart-values-under-2-as-quot-Other-quot/m-p/3471749#M132572</guid>
      <dc:creator>DallasBaba</dc:creator>
      <dc:date>2023-10-11T16:52:45Z</dc:date>
    </item>
  </channel>
</rss>

