<?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: Issue with Bar Chart Display When Switching Metrics in a Dynamic Slicer in Power BI in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Issue-with-Bar-Chart-Display-When-Switching-Metrics-in-a-Dynamic/m-p/4616929#M176678</link>
    <description>&lt;P&gt;&lt;STRONG&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="608865" data-lia-user-login="DataNinja777" class="lia-mention lia-mention-user"&gt;DataNinja777&lt;/a&gt;,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Thank you for your detailed response! I tried implementing the logarithmic scale, but unfortunately, I couldn't get it to work properly. I also attempted normalizing the values by multiplying the AVG Delay Min by 10, but the issue persisted.&lt;/P&gt;&lt;P&gt;After further analysis, I believe the real problem is that the &lt;STRONG&gt;AVG Delay Min measure isn't actually an average&lt;/STRONG&gt;, but rather the result of dividing the &lt;STRONG&gt;total delay minutes by the total number of delays&lt;/STRONG&gt;. When I use a simple AVERAGE() function, the chart displays correctly, but when I use the division (SUM(Minutes) / SUM(Delays)), the chart becomes distorted when switching metrics.&lt;/P&gt;&lt;P&gt;It seems that the scaling issue might not be caused solely by the difference in magnitude between the two measures, but rather by how Power BI processes the division when switching between them. Do you have any recommendations on how to handle this properly?&lt;/P&gt;&lt;P&gt;Thanks again for your help!&lt;/P&gt;&lt;P&gt;Best regards,&lt;BR /&gt;Pier&lt;/P&gt;</description>
    <pubDate>Wed, 19 Mar 2025 16:56:43 GMT</pubDate>
    <dc:creator>Pier8891</dc:creator>
    <dc:date>2025-03-19T16:56:43Z</dc:date>
    <item>
      <title>Issue with Bar Chart Display When Switching Metrics in a Dynamic Slicer in Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Issue-with-Bar-Chart-Display-When-Switching-Metrics-in-a-Dynamic/m-p/4615144#M176619</link>
      <description>&lt;H2&gt;&lt;STRONG&gt;Problem Description&lt;/STRONG&gt;&lt;/H2&gt;&lt;P&gt;I am using a slicer in Power BI to toggle between two different metrics in a bar chart and a donut chart. The dynamic measure I am using is the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;DAX&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;ChartValue = VAR SelectedOption = SELECTEDVALUE('Slicer 1'[Classification Delays], "Delay Minutes") RETURN SWITCH( SelectedOption, "Delay Quantities", [Nums OF DELAYS] + 0, [AVG MINS OF DELAYS] + 0 )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;The slicer allows switching between:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;"Delay Quantities"&lt;/STRONG&gt; → Represents the number of delays (Nums OF DELAYS).&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;"AVG Delay Min"&lt;/STRONG&gt; → Represents the average delay time in minutes (AVG MINS OF DELAYS).&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;However, when switching between these metrics, &lt;STRONG&gt;the bar chart becomes irregular and confusing&lt;/STRONG&gt;. Below are screenshots of the issue:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":camera:"&gt;📷&lt;/span&gt; &lt;STRONG&gt;Image 1:&lt;/STRONG&gt; When the slicer is set to &lt;STRONG&gt;"Delay Quantities"&lt;/STRONG&gt;, the bar chart correctly displays the number of delays per airport.&lt;BR /&gt;&lt;span class="lia-unicode-emoji" title=":camera:"&gt;📷&lt;/span&gt; &lt;STRONG&gt;Image 2:&lt;/STRONG&gt; When switching the slicer to &lt;STRONG&gt;"AVG Delay Min"&lt;/STRONG&gt;, the bar chart becomes distorted—some bars are extremely small, while others are disproportionately large, making comparisons difficult.&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;&amp;nbsp;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Mar 2025 17:54:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Issue-with-Bar-Chart-Display-When-Switching-Metrics-in-a-Dynamic/m-p/4615144#M176619</guid>
      <dc:creator>Pier8891</dc:creator>
      <dc:date>2025-03-18T17:54:22Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Bar Chart Display When Switching Metrics in a Dynamic Slicer in Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Issue-with-Bar-Chart-Display-When-Switching-Metrics-in-a-Dynamic/m-p/4616665#M176662</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="703214" data-lia-user-login="Pier8891" class="lia-mention lia-mention-user"&gt;Pier8891&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The issue you are experiencing with the bar chart in Power BI occurs because the two metrics—Delay Quantities (a count-based measure) and AVG Delay Min (an average-based measure)—operate on drastically different scales. The number of delays per airport can be in the thousands, while the average delay time is typically in the tens or low hundreds. When switching between these metrics, the axis scale remains static, causing one measure to appear disproportionately large while the other becomes almost invisible.&lt;/P&gt;
&lt;P&gt;A possible solution is to enable a logarithmic scale for the Y-axis in the bar chart, which helps balance the differences between large and small values by adjusting the scale dynamically. If a logarithmic scale does not provide a satisfactory visualization, another approach is to use separate measures for each metric and then create two bar charts—one displaying Nums OF DELAYS and another displaying AVG MINS OF DELAYS—while using Bookmarks and the Selection Pane to toggle between them based on the slicer selection.&lt;/P&gt;
&lt;P&gt;Alternatively, if maintaining a single chart is preferred, normalization can be applied by scaling up the AVG Delay Min values to make them more visually comparable to Delay Quantities. This can be done by multiplying the average delay minutes by a factor such as 10, ensuring that it occupies a proportional space in the bar chart. The adjusted DAX formula for this approach is:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;ChartValue = 
    VAR SelectedOption = SELECTEDVALUE('Slicer 1'[Classification Delays], "Delay Minutes") 
    RETURN SWITCH(
        SelectedOption,
        "Delay Quantities", [Nums OF DELAYS] + 0,
        "AVG Delay Min", [AVG MINS OF DELAYS] * 10
    )
&lt;/LI-CODE&gt;
&lt;P&gt;This normalization method ensures that the bars remain visually distinguishable without distorting the actual data representation. If you would like guidance on implementing bookmarks for toggling between two separate charts, let me know, and I can provide step-by-step instructions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;</description>
      <pubDate>Wed, 19 Mar 2025 14:44:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Issue-with-Bar-Chart-Display-When-Switching-Metrics-in-a-Dynamic/m-p/4616665#M176662</guid>
      <dc:creator>DataNinja777</dc:creator>
      <dc:date>2025-03-19T14:44:34Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Bar Chart Display When Switching Metrics in a Dynamic Slicer in Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Issue-with-Bar-Chart-Display-When-Switching-Metrics-in-a-Dynamic/m-p/4616929#M176678</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="608865" data-lia-user-login="DataNinja777" class="lia-mention lia-mention-user"&gt;DataNinja777&lt;/a&gt;,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Thank you for your detailed response! I tried implementing the logarithmic scale, but unfortunately, I couldn't get it to work properly. I also attempted normalizing the values by multiplying the AVG Delay Min by 10, but the issue persisted.&lt;/P&gt;&lt;P&gt;After further analysis, I believe the real problem is that the &lt;STRONG&gt;AVG Delay Min measure isn't actually an average&lt;/STRONG&gt;, but rather the result of dividing the &lt;STRONG&gt;total delay minutes by the total number of delays&lt;/STRONG&gt;. When I use a simple AVERAGE() function, the chart displays correctly, but when I use the division (SUM(Minutes) / SUM(Delays)), the chart becomes distorted when switching metrics.&lt;/P&gt;&lt;P&gt;It seems that the scaling issue might not be caused solely by the difference in magnitude between the two measures, but rather by how Power BI processes the division when switching between them. Do you have any recommendations on how to handle this properly?&lt;/P&gt;&lt;P&gt;Thanks again for your help!&lt;/P&gt;&lt;P&gt;Best regards,&lt;BR /&gt;Pier&lt;/P&gt;</description>
      <pubDate>Wed, 19 Mar 2025 16:56:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Issue-with-Bar-Chart-Display-When-Switching-Metrics-in-a-Dynamic/m-p/4616929#M176678</guid>
      <dc:creator>Pier8891</dc:creator>
      <dc:date>2025-03-19T16:56:43Z</dc:date>
    </item>
  </channel>
</rss>

