<?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: Total comes out as zero (while using Switch statement) in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-comes-out-as-zero-while-using-Switch-statement/m-p/2028402#M45411</link>
    <description>&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/user/viewprofilepage/user-id/148838" target="_blank" rel="noopener"&gt;@amitchandak&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;I would like to follow up on my inquiries. I am anxious to know how to fix row context issue in this case. Thank you so much!&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 20 Aug 2021 16:41:08 GMT</pubDate>
    <dc:creator>JustinDoh1</dc:creator>
    <dc:date>2021-08-20T16:41:08Z</dc:date>
    <item>
      <title>Total comes out as zero (while using Switch statement)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-comes-out-as-zero-while-using-Switch-statement/m-p/2024575#M45227</link>
      <description>&lt;P&gt;I am sharing my Pbix file &lt;A href="https://drive.google.com/file/d/1vxHoDzdRTEsxvxBPDMoOunUBc5JnANDg/view?usp=sharing" target="_self"&gt;here&lt;/A&gt;.&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I am fairly new to DAX, and I tried SWITCH statement for the first time today.&lt;/P&gt;&lt;P&gt;Somehow, when there is any occurrence of &lt;STRONG&gt;outcome of 0&lt;/STRONG&gt;, &lt;U&gt;&lt;STRONG&gt;T&lt;/STRONG&gt;&lt;STRONG&gt;otal comes out to be 0&lt;/STRONG&gt;&lt;/U&gt;.&lt;/P&gt;&lt;P&gt;So, on this case because&lt;STRONG&gt; Jane Doe&lt;/STRONG&gt; has output of 0, total is 0.&lt;/P&gt;&lt;P&gt;But, somehow, it does not sum up as expected to 1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have only two examples here, but total should be 1 in this case.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think there is something I need to fix on the DAX code, but I am not sure where/why.&lt;/P&gt;&lt;P&gt;This measure is called "&lt;STRONG&gt;Refused 0818&lt;/STRONG&gt;" in the file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The logic here is, when there is 1st case, output is 1, second case --&amp;gt; 0, third case --&amp;gt; 0, otherwise &lt;STRONG&gt;vRefused&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Isn't it?&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;Thank you for any feedback.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Aug 2021 21:58:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-comes-out-as-zero-while-using-Switch-statement/m-p/2024575#M45227</guid>
      <dc:creator>JustinDoh1</dc:creator>
      <dc:date>2021-08-19T21:58:13Z</dc:date>
    </item>
    <item>
      <title>Re: Total comes out as zero (while using Switch statement)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-comes-out-as-zero-while-using-Switch-statement/m-p/2024965#M45236</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="296339" data-lia-user-login="JustinDoh1" class="lia-mention lia-mention-user"&gt;JustinDoh1&lt;/a&gt; , when you use rows context example min/max (min(A) = "A")&amp;nbsp; in a measure. the calculations are done at row level. And unless we use allselected and all, we are still on the same visual row.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In such a case, the grand total is recalculated. It misses the context as it does not have a name. That we why we take the help of summarize or values to group data from rows level to grand total level&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As, summarize do not work same as the visual table always, we need to work on our formula&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;is this different from&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/DAX-Commands-and-Tips/Trying-to-understand-the-outcome-from-my-DAX-code-using-Min-amp/m-p/2024118#M45185" target="_blank"&gt;https://community.powerbi.com/t5/DAX-Commands-and-Tips/Trying-to-understand-the-outcome-from-my-DAX-code-using-Min-amp/m-p/2024118#M45185&lt;/A&gt;&lt;/P&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Aug 2021 05:37:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-comes-out-as-zero-while-using-Switch-statement/m-p/2024965#M45236</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2021-08-19T05:37:24Z</dc:date>
    </item>
    <item>
      <title>Re: Total comes out as zero (while using Switch statement)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-comes-out-as-zero-while-using-Switch-statement/m-p/2026295#M45303</link>
      <description>&lt;P&gt;&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;&lt;/P&gt;&lt;P&gt;Thank you for your feedback.&lt;/P&gt;&lt;P&gt;I was using SWITCH, but my output is still very unstable. How do I go about wrapping up my calculate to be obvious and stable?&lt;BR /&gt;How do I go about "&lt;SPAN&gt;summarize or values to group data from rows level to grand total level"?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Do I go that in the Calculate function at VAR section or inside Switch area?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have updated file &lt;A href="https://drive.google.com/file/d/1KsMQssJZfOvxXe8_KdfH0_490ZYpfnwo/view?usp=sharing" target="_self"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Aug 2021 22:05:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-comes-out-as-zero-while-using-Switch-statement/m-p/2026295#M45303</guid>
      <dc:creator>JustinDoh1</dc:creator>
      <dc:date>2021-08-19T22:05:16Z</dc:date>
    </item>
    <item>
      <title>Re: Total comes out as zero (while using Switch statement)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-comes-out-as-zero-while-using-Switch-statement/m-p/2028402#M45411</link>
      <description>&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/user/viewprofilepage/user-id/148838" target="_blank" rel="noopener"&gt;@amitchandak&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;I would like to follow up on my inquiries. I am anxious to know how to fix row context issue in this case. Thank you so much!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Aug 2021 16:41:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-comes-out-as-zero-while-using-Switch-statement/m-p/2028402#M45411</guid>
      <dc:creator>JustinDoh1</dc:creator>
      <dc:date>2021-08-20T16:41:08Z</dc:date>
    </item>
  </channel>
</rss>

