<?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: Create a pie chart with a calculated column that varies with filters in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-pie-chart-with-a-calculated-column-that-varies-with/m-p/963393#M11376</link>
    <description>&lt;P&gt;In general, to use a measure in that way, you need to use the Disconnected Table Trick as this article demonstrates: &lt;A href="https://community.powerbi.com/t5/Community-Blog/Solving-Attendance-with-the-Disconnected-Table-Trick/ba-p/279563" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/Solving-Attendance-with-the-Disconnected-Table-Trick/ba-p/279563&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 08 Mar 2020 06:12:42 GMT</pubDate>
    <dc:creator>Greg_Deckler</dc:creator>
    <dc:date>2020-03-08T06:12:42Z</dc:date>
    <item>
      <title>Create a pie chart with a calculated column that varies with filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-pie-chart-with-a-calculated-column-that-varies-with/m-p/963390#M11375</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I am having problems creating a pie chart that has to change with filters, so far i already create a chart but only works when i don't apply the filters, the moment i apply one filter the chart does not shows the right filtered data, and that's because the chart uses a calculated column named "CHART" that i created with a condition :&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;CHART = IF([WEIGHT]&amp;gt;20,"Order greater than 20","Order less than 20")&lt;/LI-CODE&gt;&lt;P&gt;but when the weight variates deppending on the filters my column with the condition doesn't take on count the new weight filtered. It stays with the total weight.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when i use the same code but in a &lt;STRONG&gt;measure&lt;/STRONG&gt; instead of in a new column, it actually changes deppending of the new filtered weight, the problem is that i can't use a measure as "Legend" for my pie chart.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here's a example of my data base that i recreate in excel (the original actually has more "FILTERS" and data in general):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;here's without filters:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;and i achieved a chart like this one:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it count and divides in a chart how many "ORDER" are "GREATER THAN 20 pounds" and how many not, using "CHART" as Legend and "Count of ORDER" as Value.&lt;/P&gt;&lt;P&gt;I would like to create a calculated column "CHART" that recalculates the values of the weight deppending on the filters (as a measure does), i.e:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;(look that the weight changes deppending on the filters and also the "CHART" column should do it)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So i can use this column for my pie chart, or if this is not possible, how can i do more charts like the first one but with the new values of the weight after the filters.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope i have explained myself enough, english it is not my first language&lt;/P&gt;&lt;P&gt;Thank you all for your help and time.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Mar 2020 06:06:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-pie-chart-with-a-calculated-column-that-varies-with/m-p/963390#M11375</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-08T06:06:07Z</dc:date>
    </item>
    <item>
      <title>Re: Create a pie chart with a calculated column that varies with filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-pie-chart-with-a-calculated-column-that-varies-with/m-p/963393#M11376</link>
      <description>&lt;P&gt;In general, to use a measure in that way, you need to use the Disconnected Table Trick as this article demonstrates: &lt;A href="https://community.powerbi.com/t5/Community-Blog/Solving-Attendance-with-the-Disconnected-Table-Trick/ba-p/279563" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/Solving-Attendance-with-the-Disconnected-Table-Trick/ba-p/279563&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Mar 2020 06:12:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-pie-chart-with-a-calculated-column-that-varies-with/m-p/963393#M11376</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2020-03-08T06:12:42Z</dc:date>
    </item>
    <item>
      <title>Re: Create a pie chart with a calculated column that varies with filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-pie-chart-with-a-calculated-column-that-varies-with/m-p/963444#M11379</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;, thank you for your reply, it would be possible that you can help me a little with the DAX command that ties everything at the end? I am very new using DAX Commands and after reading the post i just couldn't translate the DAX solution from that problem to this, specifically the "measures to show" part at the end of the post.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope you can help and thank you again!!&lt;/P&gt;</description>
      <pubDate>Sun, 08 Mar 2020 11:44:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-pie-chart-with-a-calculated-column-that-varies-with/m-p/963444#M11379</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-08T11:44:43Z</dc:date>
    </item>
    <item>
      <title>Re: Create a pie chart with a calculated column that varies with filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-pie-chart-with-a-calculated-column-that-varies-with/m-p/963505#M11382</link>
      <description>&lt;P&gt;Right, so create a new table with just this information:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Table: ChartLegend&lt;/P&gt;
&lt;P&gt;Chart&lt;/P&gt;
&lt;P&gt;Greater than 20&lt;/P&gt;
&lt;P&gt;Less than 20&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You will use this as your Legend.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now you are going to need a measure that goes something like:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure =
  __Chart = MAX('ChartLegend'[Chart]) //get your current value for your legend
  __Table = 'Table' //get your fact table with current filters
  __Table1 = ADDCOLUMNS('Table',"__Chart",&amp;lt;Some calculation goes here&amp;gt;) //add your dynamic column
RETURN
  SWITCH(__Chart,
    "Greater than 20",COUNTROWS(FILTER(__Table1,__Chart = "Greater than 20")),
    "Less than 20",COUNTROWS(FILTER(__Table1,__Chart = "Less than 20")),
  )
    
  &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;</description>
      <pubDate>Sun, 08 Mar 2020 14:42:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-pie-chart-with-a-calculated-column-that-varies-with/m-p/963505#M11382</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2020-03-08T14:42:28Z</dc:date>
    </item>
    <item>
      <title>Re: Create a pie chart with a calculated column that varies with filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-pie-chart-with-a-calculated-column-that-varies-with/m-p/963977#M11395</link>
      <description>&lt;P&gt;Thank you for your help man,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the script when i use&amp;nbsp;&lt;/P&gt;&lt;P&gt;Measure =&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; __Chart = MAX(...) , "__Chart" is my existing column named "Chart" or is a new one that the measure will create? because the script program sends me a "unexpected expression".&lt;BR /&gt;I am not sure if the measure can let me do something like:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; measure = __chart = MAX()&amp;nbsp; = __table = 'table'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Most likely my error is that i'm trying to take that script to literally for my measure.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Mar 2020 06:04:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-pie-chart-with-a-calculated-column-that-varies-with/m-p/963977#M11395</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-09T06:04:26Z</dc:date>
    </item>
  </channel>
</rss>

