<?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: Mixing Iterative with Non Iterative Functions in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Mixing-Iterative-with-Non-Iterative-Functions/m-p/2260004#M54613</link>
    <description>&lt;P&gt;Thanks! Will try and do some more reading on it&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 29 Dec 2021 18:10:30 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-12-29T18:10:30Z</dc:date>
    <item>
      <title>Mixing Iterative with Non Iterative Functions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Mixing-Iterative-with-Non-Iterative-Functions/m-p/2116020#M48476</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a formula which calculates, at a customer by customer level, the value of their business if new. I need to use a sumx for this to iterate down the customer table in order to check if it is a new customer within the date period selected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Wins (Current Year) = 
var Comp1Sel = SELECTEDVALUE('Measure Select'[Measure Select])
var Comp2Sel = SELECTEDVALUE('Measure Select (Second Table)'[Measure Select]) 
var mindate = STARTOFYEAR('Date Mapping'[Month])
var maxdate = ENDOFYEAR('Date Mapping'[Month])
return

if(Comp1Sel="Prior Year",

sumx('BU Master Data',CALCULATE([Comparator 2],'BU Master Data'[Open Month (No Blanks)]&amp;gt;=mindate,'BU Master Data'[Open Month (No Blanks)]&amp;lt;=maxdate) - 
                      CALCULATE([Comparator 1],'BU Master Data'[Open Month (No Blanks)]&amp;gt;=mindate,'BU Master Data'[Open Month (No Blanks)]&amp;lt;=maxdate))

,

sumx('BU Master Data',if(CALCULATE([Comparator 1 Exists?],'BU Master Data'[Open Month (No Blanks)]&amp;gt;=mindate,'BU Master Data'[Open Month (No Blanks)]&amp;lt;=maxdate)=0,
                         CALCULATE([Comparator 2],'BU Master Data'[Open Month (No Blanks)]&amp;gt;=mindate,'BU Master Data'[Open Month (No Blanks)]&amp;lt;=maxdate),0))
                        
)
-CALCULATE([Comparator 1],'BU Master Data'[BU Parent Group]="Unknown Wins")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also have multiple other efficiency formulas. These cannot be a SUMX as the total by each customer will not tie to the total across the business due to blended rates.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;F&amp;amp;B Efficiency = 'Non Core Measures: Walk &amp;amp; Efficiencies'[Comparator 2 Revenue (Efficiency)]*(([Comparator GP % (Efficiency)]-[Comparator 2 GP % (Efficiency)]))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to subtract the new business formula from my efficiency formulas, as I do not want new business included within those rates. Is this possible given one is iterative and one is not? I cannot flag if a customer is new business as a column, as it'll be based on a users selection from the date table, so needs to be dynamic.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be really appreciated&lt;/P&gt;</description>
      <pubDate>Tue, 05 Oct 2021 11:03:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Mixing-Iterative-with-Non-Iterative-Functions/m-p/2116020#M48476</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-10-05T11:03:07Z</dc:date>
    </item>
    <item>
      <title>Re: Mixing Iterative with Non Iterative Functions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Mixing-Iterative-with-Non-Iterative-Functions/m-p/2256031#M54449</link>
      <description>&lt;P&gt;I would create an entirely separate measure to cover your last scenario. Re-using measures is not good practice anyway.&lt;/P&gt;</description>
      <pubDate>Sun, 26 Dec 2021 16:33:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Mixing-Iterative-with-Non-Iterative-Functions/m-p/2256031#M54449</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2021-12-26T16:33:10Z</dc:date>
    </item>
    <item>
      <title>Re: Mixing Iterative with Non Iterative Functions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Mixing-Iterative-with-Non-Iterative-Functions/m-p/2256304#M54461</link>
      <description>&lt;P&gt;Thanks! I'm very interested in why reusing measures is not good practice. I couldn't find anything to support this on Google but would love to understand why. Is it performance related at all? My model uses a sort of cascading waterfall of measures where my first measure does a lot of the generic work, looking for selected values etc and then the next level down will be more specific to that measure. I know I will have at least 10 levels in some scenarios so just wondering if that is bad news performance wise?&lt;/P&gt;</description>
      <pubDate>Mon, 27 Dec 2021 05:12:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Mixing-Iterative-with-Non-Iterative-Functions/m-p/2256304#M54461</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-12-27T05:12:55Z</dc:date>
    </item>
    <item>
      <title>Re: Mixing Iterative with Non Iterative Functions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Mixing-Iterative-with-Non-Iterative-Functions/m-p/2256883#M54484</link>
      <description>&lt;P&gt;A measure most of the time includes some sort of context transition, new context creation or context replacement. Do that in a nested fashion and you are at risk of doing a lot of unnecessary work, losing your plot, or both. Not to mention the troubleshooting nightmare when performance goes sideways.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Dec 2021 12:46:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Mixing-Iterative-with-Non-Iterative-Functions/m-p/2256883#M54484</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2021-12-27T12:46:02Z</dc:date>
    </item>
    <item>
      <title>Re: Mixing Iterative with Non Iterative Functions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Mixing-Iterative-with-Non-Iterative-Functions/m-p/2260004#M54613</link>
      <description>&lt;P&gt;Thanks! Will try and do some more reading on it&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Dec 2021 18:10:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Mixing-Iterative-with-Non-Iterative-Functions/m-p/2260004#M54613</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-12-29T18:10:30Z</dc:date>
    </item>
  </channel>
</rss>

