<?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 Issue with ALLSELECT in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Issue-with-ALLSELECT/m-p/1066812#M14918</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I am fairly new to DAX and am having a problem doing an advance calculation.&amp;nbsp;Without going into the full-blown explanation of cohort Surval Rate calculation, I have tried to focus on a small using which I think stems from an ALLSELECT statement I use.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If someone can anyone &lt;U&gt;please&lt;/U&gt; tell me what I am going wrong I would be extremely grateful!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The table below explains my issue. In summary, the measure &lt;STRONG&gt;GC2&lt;/STRONG&gt; works but I have a problem with the measure &lt;STRONG&gt;GC3&lt;/STRONG&gt;. I see this is because the measure&amp;nbsp;&lt;STRONG&gt;X3&lt;/STRONG&gt; returns &lt;FONT color="#FF6600"&gt;ZEROs&lt;/FONT&gt;&amp;nbsp;in each row and not &lt;FONT color="#FF6600"&gt;0.816&lt;/FONT&gt; in each row. However, the calculation works in measure&lt;STRONG&gt; X2&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The formulas are:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;GC2=X2* Y2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;GC3=X3* Y3&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Where X2 and X3 are generated by the following formulas&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;X2 = CALCULATE([GC1],
FILTER(Allselected(SurvivalRate),
SurvivalRate[GradeCode]=1))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;X3 = CALCULATE([GC2],
FILTER(Allselected(SurvivalRate),
SurvivalRate[GradeCode]=2))&lt;/LI-CODE&gt;&lt;P&gt;You can open this link to my&amp;nbsp;&lt;A href="https://1drv.ms/u/s!AhfGsxr8hYaRiYFVS_6-5BjNLHR4-Q?e=5aZhUU" target="_blank" rel="noopener"&gt;example file&lt;/A&gt;&amp;nbsp;which I have published on my Onedrive account, but this table attempts to explain the issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 04 May 2020 13:32:43 GMT</pubDate>
    <dc:creator>CrudenBoy</dc:creator>
    <dc:date>2020-05-04T13:32:43Z</dc:date>
    <item>
      <title>Issue with ALLSELECT</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Issue-with-ALLSELECT/m-p/1066812#M14918</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I am fairly new to DAX and am having a problem doing an advance calculation.&amp;nbsp;Without going into the full-blown explanation of cohort Surval Rate calculation, I have tried to focus on a small using which I think stems from an ALLSELECT statement I use.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If someone can anyone &lt;U&gt;please&lt;/U&gt; tell me what I am going wrong I would be extremely grateful!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The table below explains my issue. In summary, the measure &lt;STRONG&gt;GC2&lt;/STRONG&gt; works but I have a problem with the measure &lt;STRONG&gt;GC3&lt;/STRONG&gt;. I see this is because the measure&amp;nbsp;&lt;STRONG&gt;X3&lt;/STRONG&gt; returns &lt;FONT color="#FF6600"&gt;ZEROs&lt;/FONT&gt;&amp;nbsp;in each row and not &lt;FONT color="#FF6600"&gt;0.816&lt;/FONT&gt; in each row. However, the calculation works in measure&lt;STRONG&gt; X2&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The formulas are:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;GC2=X2* Y2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;GC3=X3* Y3&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Where X2 and X3 are generated by the following formulas&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;X2 = CALCULATE([GC1],
FILTER(Allselected(SurvivalRate),
SurvivalRate[GradeCode]=1))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;X3 = CALCULATE([GC2],
FILTER(Allselected(SurvivalRate),
SurvivalRate[GradeCode]=2))&lt;/LI-CODE&gt;&lt;P&gt;You can open this link to my&amp;nbsp;&lt;A href="https://1drv.ms/u/s!AhfGsxr8hYaRiYFVS_6-5BjNLHR4-Q?e=5aZhUU" target="_blank" rel="noopener"&gt;example file&lt;/A&gt;&amp;nbsp;which I have published on my Onedrive account, but this table attempts to explain the issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2020 13:32:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Issue-with-ALLSELECT/m-p/1066812#M14918</guid>
      <dc:creator>CrudenBoy</dc:creator>
      <dc:date>2020-05-04T13:32:43Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with ALLSELECT</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Issue-with-ALLSELECT/m-p/1068208#M14960</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="138247" data-lia-user-login="CrudenBoy" class="lia-mention lia-mention-user"&gt;CrudenBoy&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you explain the logic behind the calculation for X2, X3, Y2 &amp;amp; Y3 along with example?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers!&lt;BR /&gt;Vivek&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.vivran.in/" target="_blank"&gt;https://www.vivran.in/&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://www.linkedin.com/in/vivek-ranjan-063a1a17b/" target="_blank"&gt;Connect on LinkedIn&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2020 02:17:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Issue-with-ALLSELECT/m-p/1068208#M14960</guid>
      <dc:creator>vivran22</dc:creator>
      <dc:date>2020-05-05T02:17:13Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with ALLSELECT</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Issue-with-ALLSELECT/m-p/1074126#M15039</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="138247" data-lia-user-login="CrudenBoy" class="lia-mention lia-mention-user"&gt;CrudenBoy&lt;/a&gt;&amp;nbsp; What is it you are ultimately trying to acheive? Do GC0, GC1, etc actually need to be in separate columns? I'm wondering if you could use the EARLIER function to create a series of calculated columns in a GradeCode table that has each grade code listed once?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://blog.enterprisedna.co/how-to-use-the-earlier-function-in-power-bi-a-dax-tutorial/" target="_blank"&gt;https://blog.enterprisedna.co/how-to-use-the-earlier-function-in-power-bi-a-dax-tutorial/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Iterators might also help to lock in the row and table context that each measure needs to calculate within, rather than how they are now which is floating across the data model and recalculating depending on how you setup your table.&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.microsoftpressstore.com/articles/article.aspx?p=2449191&amp;amp;seqNum=3" target="_blank"&gt;https://www.microsoftpressstore.com/articles/article.aspx?p=2449191&amp;amp;seqNum=3&lt;/A&gt;&lt;/P&gt;&lt;P&gt;EARLIER and Iterators might help you get what you need.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Has this post solved your problem? Please &lt;STRONG&gt;mark it as a solution&lt;/STRONG&gt; so that others can find it quickly and to let the community know your problem has been solved.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you found this post helpful, please &lt;STRONG&gt;give Kudos&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;I work as a trainer and consultant for Microsoft 365, specialising in Power BI and Power Query.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://sites.google.com/site/allisonkennedycv" target="_blank"&gt;https://sites.google.com/site/allisonkennedycv&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2020 23:57:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Issue-with-ALLSELECT/m-p/1074126#M15039</guid>
      <dc:creator>AllisonKennedy</dc:creator>
      <dc:date>2020-05-05T23:57:31Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with ALLSELECT</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Issue-with-ALLSELECT/m-p/1074188#M15045</link>
      <description>Without explaining the logic behind your measures... you can easily forget about anyone giving you an answer to your problem.&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D</description>
      <pubDate>Wed, 06 May 2020 00:45:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Issue-with-ALLSELECT/m-p/1074188#M15045</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-06T00:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with ALLSELECT</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Issue-with-ALLSELECT/m-p/1074546#M15054</link>
      <description>&lt;P&gt;Thank you very much for your feedback Anonymous&lt;/a&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="227497" data-lia-user-login="AllisonKennedy" class="lia-mention lia-mention-user"&gt;AllisonKennedy&lt;/a&gt;&amp;nbsp; and &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="141768" data-lia-user-login="vivran22" class="lia-mention lia-mention-user"&gt;vivran22&lt;/a&gt;&amp;nbsp;and let me apologise for my limited description of my problem. Alison's post was very useful as it made me read up about the filter context and row context and I have managed to make progress.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 May 2020 13:34:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Issue-with-ALLSELECT/m-p/1074546#M15054</guid>
      <dc:creator>CrudenBoy</dc:creator>
      <dc:date>2020-05-06T13:34:18Z</dc:date>
    </item>
  </channel>
</rss>

