<?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 COALESCE not working in stacked bar chart, need another solution in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COALESCE-not-working-in-stacked-bar-chart-need-another-solution/m-p/2250648#M54163</link>
    <description>&lt;P&gt;Hello all!&lt;/P&gt;&lt;P&gt;I have survey data where there are 9 questions, and the answers are on a scale of 0-4:&lt;/P&gt;&lt;P&gt;4 = Consistently&lt;/P&gt;&lt;P&gt;3 = Inconsistently&lt;/P&gt;&lt;P&gt;2 = Minimally&lt;/P&gt;&lt;P&gt;1 = Not at all&lt;/P&gt;&lt;P&gt;0 = N/A&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That's not important though.&amp;nbsp; I was using COALESCE to find the percentage of students (by grade) who answered with each response, with question # on the slicer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, slicer:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Percentages in a matrix:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I had used this measure to obtain the percentages:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Response % = COALESCE(DISTINCTCOUNT('Sheet2'[Index]),0)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I want my stacked bar chart to match the matrix, and it does not.&amp;nbsp; So therefore I think I need a different DAX measure.&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;/P&gt;&lt;P&gt;I am not yet able to attach files here, as I don't have access to that feature yet.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the PowerBI file:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://drive.google.com/file/d/1Zv24DJCi6ea2l16wLGf-OaY9uIeAxJJ3/view?usp=sharing" target="_self"&gt;Stacked Bar Chart HELP!&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance to anyone who can help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 21 Dec 2021 19:43:42 GMT</pubDate>
    <dc:creator>afaherty</dc:creator>
    <dc:date>2021-12-21T19:43:42Z</dc:date>
    <item>
      <title>COALESCE not working in stacked bar chart, need another solution</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COALESCE-not-working-in-stacked-bar-chart-need-another-solution/m-p/2250648#M54163</link>
      <description>&lt;P&gt;Hello all!&lt;/P&gt;&lt;P&gt;I have survey data where there are 9 questions, and the answers are on a scale of 0-4:&lt;/P&gt;&lt;P&gt;4 = Consistently&lt;/P&gt;&lt;P&gt;3 = Inconsistently&lt;/P&gt;&lt;P&gt;2 = Minimally&lt;/P&gt;&lt;P&gt;1 = Not at all&lt;/P&gt;&lt;P&gt;0 = N/A&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That's not important though.&amp;nbsp; I was using COALESCE to find the percentage of students (by grade) who answered with each response, with question # on the slicer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, slicer:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Percentages in a matrix:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I had used this measure to obtain the percentages:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Response % = COALESCE(DISTINCTCOUNT('Sheet2'[Index]),0)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I want my stacked bar chart to match the matrix, and it does not.&amp;nbsp; So therefore I think I need a different DAX measure.&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;/P&gt;&lt;P&gt;I am not yet able to attach files here, as I don't have access to that feature yet.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the PowerBI file:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://drive.google.com/file/d/1Zv24DJCi6ea2l16wLGf-OaY9uIeAxJJ3/view?usp=sharing" target="_self"&gt;Stacked Bar Chart HELP!&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance to anyone who can help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Dec 2021 19:43:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COALESCE-not-working-in-stacked-bar-chart-need-another-solution/m-p/2250648#M54163</guid>
      <dc:creator>afaherty</dc:creator>
      <dc:date>2021-12-21T19:43:42Z</dc:date>
    </item>
    <item>
      <title>Re: COALESCE not working in stacked bar chart, need another solution</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COALESCE-not-working-in-stacked-bar-chart-need-another-solution/m-p/2250761#M54181</link>
      <description>&lt;P&gt;It looks like the bar chart doesn't have an axis total quick calculation option, so you'll need to write your own explicit measure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This should work for both the matrix and the bar chart without applying any 'Show value as' adjustments.&lt;/P&gt;
&lt;LI-CODE lang="php"&gt;Response % =
DIVIDE (
    DISTINCTCOUNT ( 'Sheet2'[Index] ),
    CALCULATE (
        DISTINCTCOUNT ( Sheet2[Index] ),
        ALLSELECTED ( Sheet2[Survey Likert Response] )
    )
)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Dec 2021 22:32:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COALESCE-not-working-in-stacked-bar-chart-need-another-solution/m-p/2250761#M54181</guid>
      <dc:creator>AlexisOlson</dc:creator>
      <dc:date>2021-12-21T22:32:04Z</dc:date>
    </item>
    <item>
      <title>Re: COALESCE not working in stacked bar chart, need another solution</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COALESCE-not-working-in-stacked-bar-chart-need-another-solution/m-p/2252013#M54248</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="39298" data-lia-user-login="AlexisOlson" class="lia-mention lia-mention-user"&gt;AlexisOlson&lt;/a&gt;&amp;nbsp;Thank you! Perfect!&lt;/P&gt;</description>
      <pubDate>Wed, 22 Dec 2021 12:59:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COALESCE-not-working-in-stacked-bar-chart-need-another-solution/m-p/2252013#M54248</guid>
      <dc:creator>afaherty</dc:creator>
      <dc:date>2021-12-22T12:59:37Z</dc:date>
    </item>
  </channel>
</rss>

