<?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: Switch Function not working in other visuals such as bar chart. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-Function-not-working-in-other-visuals-such-as-bar-chart/m-p/4923831#M186886</link>
    <description>&lt;P&gt;Many thanks, my current measure I try to formatted it because I have to show with Percentage and Whole Number.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My measure:&lt;/P&gt;&lt;P&gt;Sales Display (Formatted) =&lt;BR /&gt;SWITCH(&lt;BR /&gt;SELECTEDVALUE(DisplayType[Type]),&lt;BR /&gt;"Percent", FORMAT([Sales %], "0.00%"),&lt;BR /&gt;FORMAT([Total Sales], "#,##0")&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It can works on bar chart after I removed the Format function. Anyway, does it possible to format it to show in Whole Number and Percentage?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 23 Jan 2026 02:17:03 GMT</pubDate>
    <dc:creator>sumpekung</dc:creator>
    <dc:date>2026-01-23T02:17:03Z</dc:date>
    <item>
      <title>Switch Function not working in other visuals such as bar chart.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-Function-not-working-in-other-visuals-such-as-bar-chart/m-p/4922444#M186837</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to see old forums from others but don't see the exact answer U need to know.&lt;/P&gt;&lt;P&gt;I created a switch measure and it's working good with Matrix and Table visuals but it doesn't work with other visual such as Bar and Column charts, it can't even drag the switched measure into the Y axis field.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note : I use powerBI May-2025 at my company, don't sure powerBI at workplace has more limit than common user or not?&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jan 2026 09:39:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-Function-not-working-in-other-visuals-such-as-bar-chart/m-p/4922444#M186837</guid>
      <dc:creator>sumpekung</dc:creator>
      <dc:date>2026-01-21T09:39:42Z</dc:date>
    </item>
    <item>
      <title>Re: Switch Function not working in other visuals such as bar chart.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-Function-not-working-in-other-visuals-such-as-bar-chart/m-p/4922571#M186844</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="503432" data-lia-user-login="sumpekung" class="lia-mention lia-mention-user"&gt;sumpekung&lt;/a&gt;,&amp;nbsp;If you would like, you may share your exact SWITCH measure and I can help you refine it so that it behaves consistently across all visuals.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Quick verification you can perform now:&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;The SWITCH works in Matrix and Table visuals because they support multiple data types.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Bar and column charts accept only numeric measures on the Y‑axis.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;If any branch of the SWITCH produces a non‑numeric value, the measure is excluded from the Y‑axis.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Standardising all returned values to numeric types resolves the issue.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this response was helpful in any way, I’d gladly accept a &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;much like the joy of seeing a DAX measure work first time without needing another FILTER.&lt;/P&gt;&lt;P&gt;Please mark it as the correct solution. It helps other community members find their way faster (and saves them from another endless loop &lt;span class="lia-unicode-emoji" title=":cyclone:"&gt;🌀&lt;/span&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jan 2026 12:04:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-Function-not-working-in-other-visuals-such-as-bar-chart/m-p/4922571#M186844</guid>
      <dc:creator>Zanqueta</dc:creator>
      <dc:date>2026-01-21T12:04:24Z</dc:date>
    </item>
    <item>
      <title>Re: Switch Function not working in other visuals such as bar chart.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-Function-not-working-in-other-visuals-such-as-bar-chart/m-p/4923831#M186886</link>
      <description>&lt;P&gt;Many thanks, my current measure I try to formatted it because I have to show with Percentage and Whole Number.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My measure:&lt;/P&gt;&lt;P&gt;Sales Display (Formatted) =&lt;BR /&gt;SWITCH(&lt;BR /&gt;SELECTEDVALUE(DisplayType[Type]),&lt;BR /&gt;"Percent", FORMAT([Sales %], "0.00%"),&lt;BR /&gt;FORMAT([Total Sales], "#,##0")&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It can works on bar chart after I removed the Format function. Anyway, does it possible to format it to show in Whole Number and Percentage?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jan 2026 02:17:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-Function-not-working-in-other-visuals-such-as-bar-chart/m-p/4923831#M186886</guid>
      <dc:creator>sumpekung</dc:creator>
      <dc:date>2026-01-23T02:17:03Z</dc:date>
    </item>
  </channel>
</rss>

