<?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: VAR RETURN ALL in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/VAR-RETURN-ALL/m-p/2189919#M51164</link>
    <description>&lt;P&gt;Thanks for the reply both&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="264353" data-lia-user-login="wdx223_Daniel" class="lia-mention lia-mention-user"&gt;wdx223_Daniel&lt;/a&gt;&amp;nbsp;&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 15 Nov 2021 09:38:41 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-11-15T09:38:41Z</dc:date>
    <item>
      <title>VAR RETURN ALL</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/VAR-RETURN-ALL/m-p/2186721#M51009</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a page filter to show only current active contracts information. However, I would like to add a column to calculate total sales which includes expired contacts. Hence, I used the following formula:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Total Sales ALL=&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;STRONG&gt;VAR&lt;/STRONG&gt; Active Contract Sales&lt;/SPAN&gt;&lt;SPAN&gt;= &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[Total Sales]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;DATESBETWEEN&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Calendar'[Date]&lt;/SPAN&gt;&lt;SPAN&gt;,date (start date)&lt;/SPAN&gt;&lt;SPAN&gt;), date (end date))&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;STRONG&gt;RETURN&lt;/STRONG&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Active Contract Sales&lt;/SPAN&gt;&lt;SPAN&gt;, ALL&lt;/SPAN&gt;&lt;SPAN&gt;('&lt;/SPAN&gt;&lt;SPAN&gt;Contract Details'[Active Status]&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;From the formula above, the result I got is without the sales from expired contract (i.e. same as the result using Active Contract Sales= CALCULATE([Total Sales],DATESBETWEEN('Calendar'[Date],date (start date)), date (end date)))&lt;BR /&gt;&lt;BR /&gt;However, when i tried to separate the VAR RETURN formula into two different measures as below, i managed to get the sales from both active and expired contracts:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;DIV&gt;&lt;STRONG&gt;Measure 1=&amp;nbsp;&lt;/STRONG&gt;CALCULATE([Total Sales],DATESBETWEEN('Calendar'[Date],date (start date)), date (end date)))&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Measure 2= &lt;/STRONG&gt;CALCULATE([Measure 1], ALL('Contract Details'[Active Status]))&lt;BR /&gt;&lt;BR /&gt;Anyone knows what is wrong with my VAR RETURN formula please?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thank you!&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 12 Nov 2021 06:53:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/VAR-RETURN-ALL/m-p/2186721#M51009</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-11-12T06:53:07Z</dc:date>
    </item>
    <item>
      <title>Re: VAR RETURN ALL</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/VAR-RETURN-ALL/m-p/2186905#M51013</link>
      <description>&lt;P&gt;Hello&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Could you please share the pbix file after removing the sensitive information?&lt;/P&gt;</description>
      <pubDate>Fri, 12 Nov 2021 08:23:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/VAR-RETURN-ALL/m-p/2186905#M51013</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-11-12T08:23:18Z</dc:date>
    </item>
    <item>
      <title>Re: VAR RETURN ALL</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/VAR-RETURN-ALL/m-p/2186993#M51016</link>
      <description>&lt;P&gt;variance can not be used in the first parament of CALCULATE. variance only be calculated once, after calculating, its value became solid, can never be changed.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Nov 2021 08:58:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/VAR-RETURN-ALL/m-p/2186993#M51016</guid>
      <dc:creator>wdx223_Daniel</dc:creator>
      <dc:date>2021-11-12T08:58:18Z</dc:date>
    </item>
    <item>
      <title>Re: VAR RETURN ALL</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/VAR-RETURN-ALL/m-p/2189919#M51164</link>
      <description>&lt;P&gt;Thanks for the reply both&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="264353" data-lia-user-login="wdx223_Daniel" class="lia-mention lia-mention-user"&gt;wdx223_Daniel&lt;/a&gt;&amp;nbsp;&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Nov 2021 09:38:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/VAR-RETURN-ALL/m-p/2189919#M51164</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-11-15T09:38:41Z</dc:date>
    </item>
  </channel>
</rss>

