<?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 Change column color in a bar chart based on a slicer in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Change-column-color-in-a-bar-chart-based-on-a-slicer/m-p/2557995#M72692</link>
    <description>&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;I have a simple table (Name, Value) , and I have a slicer with Name&lt;/P&gt;&lt;P&gt;Requirement:&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I select a name, the bar of this name changes its color, like this picture&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;My thoughts are:&lt;/P&gt;&lt;P&gt;1. delete the interaction between the slicer and the bar chart&lt;/P&gt;&lt;P&gt;2.develop a dax formula to get only the selected value ( SelectedValue function won't work as it will get a the same name for each row)&lt;/P&gt;&lt;P&gt;3. this dax will generate 1 only for the selected row and 0 for other rows&lt;/P&gt;&lt;P&gt;4.make color code based on the rule that this function = 1 to be red&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Fri, 03 Jun 2022 13:33:07 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-06-03T13:33:07Z</dc:date>
    <item>
      <title>Change column color in a bar chart based on a slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Change-column-color-in-a-bar-chart-based-on-a-slicer/m-p/2557995#M72692</link>
      <description>&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;I have a simple table (Name, Value) , and I have a slicer with Name&lt;/P&gt;&lt;P&gt;Requirement:&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I select a name, the bar of this name changes its color, like this picture&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;My thoughts are:&lt;/P&gt;&lt;P&gt;1. delete the interaction between the slicer and the bar chart&lt;/P&gt;&lt;P&gt;2.develop a dax formula to get only the selected value ( SelectedValue function won't work as it will get a the same name for each row)&lt;/P&gt;&lt;P&gt;3. this dax will generate 1 only for the selected row and 0 for other rows&lt;/P&gt;&lt;P&gt;4.make color code based on the rule that this function = 1 to be red&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jun 2022 13:33:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Change-column-color-in-a-bar-chart-based-on-a-slicer/m-p/2557995#M72692</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-03T13:33:07Z</dc:date>
    </item>
    <item>
      <title>Re: Change column color in a bar chart based on a slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Change-column-color-in-a-bar-chart-based-on-a-slicer/m-p/2558811#M72745</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , Create an independent date table with name&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Names = distinct(Table[Name])&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;then create a color measure and use that in conditional formatting using field value option&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use color name or hex code with prefix #&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;color = if(isfiltered(Names[Name])&amp;nbsp; &amp;amp;&amp;amp; Max(Table[Name])&amp;nbsp; in allselected(Names[Name]) , "Red", "Blue" )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PowerBI Abstract Thesis: How to do conditional formatting by measure and apply it on pie? &lt;BR /&gt;&lt;A href="https://www.youtube.com/watch?v=RqBb5eBf_I4&amp;amp;list=PLPaNVDMhUXGYo50Ajmr4SgSV9HIQLxc8L" target="_blank"&gt;https://www.youtube.com/watch?v=RqBb5eBf_I4&amp;amp;list=PLPaNVDMhUXGYo50Ajmr4SgSV9HIQLxc8L&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/Power-BI-Conditional-formatting-the-Pie-Visual/ba-p/1682539" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/Power-BI-Conditional-formatting-the-Pie-Visual/ba-p/1682539&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Jun 2022 03:54:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Change-column-color-in-a-bar-chart-based-on-a-slicer/m-p/2558811#M72745</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-06-04T03:54:49Z</dc:date>
    </item>
    <item>
      <title>Re: Change column color in a bar chart based on a slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Change-column-color-in-a-bar-chart-based-on-a-slicer/m-p/2558834#M72746</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&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; this helped alot,&lt;/P&gt;&lt;P&gt;also I developed a calculation with same logic that may help anyone&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;color 2 = &lt;/SPAN&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;HASonevalue&lt;/SPAN&gt;&lt;SPAN&gt;(Names[Name]&lt;/SPAN&gt;&lt;SPAN&gt;)&amp;amp;&amp;amp;&lt;/SPAN&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Table'[Name]&lt;/SPAN&gt;&lt;SPAN&gt;) &lt;/SPAN&gt;&lt;SPAN&gt;in&lt;/SPAN&gt; &lt;SPAN&gt;VALUES&lt;/SPAN&gt;&lt;SPAN&gt;(Names[Name]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;"Red"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"Blue"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 04 Jun 2022 04:37:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Change-column-color-in-a-bar-chart-based-on-a-slicer/m-p/2558834#M72746</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-04T04:37:16Z</dc:date>
    </item>
    <item>
      <title>Re: Change column color in a bar chart based on a slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Change-column-color-in-a-bar-chart-based-on-a-slicer/m-p/2904710#M94727</link>
      <description>&lt;P&gt;Similar problem that you've answered before.&amp;nbsp; Want selected column to be a different color.&amp;nbsp; I followed your instructions, but cannot get only one column to change color based on slicer selection. All columns turn blue or red.&amp;nbsp;&lt;BR /&gt;&lt;STRONG&gt;What I have:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;What I want:&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;Table&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;DISTINCT = &lt;/SPAN&gt;&lt;SPAN&gt;distinct&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Example'[Letters]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Measure&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Colors = &lt;/SPAN&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;ISFILTERED&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Example[Letters]&lt;/SPAN&gt;&lt;SPAN&gt;) &amp;amp;&amp;amp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Max&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'DISTINCT'[Letters]&lt;/SPAN&gt;&lt;SPAN&gt;) &lt;/SPAN&gt;&lt;SPAN&gt;in&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ALLSELECTED&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Example[Letters]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;"Red"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"Blue")&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Please advise what I am doing wrong. Thanks!&lt;/STRONG&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 14 Nov 2022 20:57:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Change-column-color-in-a-bar-chart-based-on-a-slicer/m-p/2904710#M94727</guid>
      <dc:creator>zona</dc:creator>
      <dc:date>2022-11-14T20:57:32Z</dc:date>
    </item>
  </channel>
</rss>

