<?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: Untangle this crazy condtional DAX statement in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Untangle-this-crazy-condtional-DAX-statement/m-p/777215#M3991</link>
    <description>&lt;P&gt;I ran this through the Dax formatter at&amp;nbsp; daxformatter.com and it doesn't format as DAX&lt;/P&gt;</description>
    <pubDate>Tue, 27 Aug 2019 21:26:11 GMT</pubDate>
    <dc:creator>kentyler</dc:creator>
    <dc:date>2019-08-27T21:26:11Z</dc:date>
    <item>
      <title>Untangle this crazy condtional DAX statement</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Untangle-this-crazy-condtional-DAX-statement/m-p/777103#M3986</link>
      <description>&lt;P&gt;This a fine community that has taught me a lot.&amp;nbsp; Thanks for your help on this one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have generally used short single purpose DAX statements and am what one might call a low-intermediate in DAX.&amp;nbsp; I would love some help untangling this huge crazy DAX formula my predicessor left as some sort of conditional statement in an Excel cell.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In reverse engineering this I have come across some aspects of the formula syntax I haven't seen nor have come to a conclusion after 6 hours of internet searching.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I first thought this was a nested if statement, but don't see 'If" and the only DAX function I see is "AND".&amp;nbsp;&amp;nbsp; I can see a pattern of conditions but it doesn't look like nesting that I know of. &amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the basic pattern: &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;=AND([@[Allocated Salary]]&amp;gt;0, [@[Revised Salary]]=0, [@[Change Effective Date]]=0, [@[End Date]]=0, 'Controls'!$D$4=0, 'Controls'!$E$4=0&lt;FONT color="#000000"&gt;) [&lt;/FONT&gt;@[Allocated Salary]]/'US Working Days'!$E$3*'US Working Days'!$B$2 AND . . .&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It quasi repeats with different conditions.&lt;/P&gt;&lt;P&gt;The whole statement in the cell is pasted below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Things that puzzle me:&lt;/P&gt;&lt;P&gt;1.&amp;nbsp; What is the significance of the space between the ") ["&amp;nbsp; that I highlighted in orange below?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; Similiarly, I find that space to include a '0' sometimes (highlighed in blue below?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3.&amp;nbsp; Is this even DAX?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;What is going on in this huge statement?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;=AND([@[Allocated Salary]]&amp;gt;0,
[@[Revised Salary]]=0,
[@[Change Effective Date]]=0,
[@[End Date]]=0,
'Controls'!$D$4=0,
'Controls'!$E$4=0&lt;FONT color="#ff6600"&gt;) [&lt;/FONT&gt;@[Allocated Salary]]/'US Working Days'!$E$3*'US Working Days'!$B$2 AND([@[Allocated Salary]]&amp;gt;0,
[@[Revised Salary]]&amp;gt;=0,
[@[Change Effective Date]]&amp;gt;$AE$1,
[@[End Date]]&amp;lt;=$AE$1,
'Controls'!$D$4=0,
'Controls'!$E$4=0&lt;FONT color="#ff6600"&gt;) [&lt;/FONT&gt;@[Allocated Salary]]/'US Working Days'!$E$3*'US Working Days'!$B$2 AND([@[Allocated Salary]]&amp;gt;0,
[@[Revised Salary]]&amp;gt;0,
[@[Change Effective Date]]=0,
[@[End Date]]=0,
'Controls'!$D$4=0,
'Controls'!$E$4=0&lt;FONT color="#ff6600"&gt;) [&lt;/FONT&gt;@[Allocated Salary]]/'US Working Days'!$E$3*'US Working Days'!$B$2 AND([@[Allocated Salary]]&amp;gt;0,
[@[Revised Salary]]&amp;gt;0,
[@[Change Effective Date]]&amp;gt;=$AE$1,
[@[End Date]]=0,
'Controls'!$D$4=0,
'Controls'!$E$4=0&lt;FONT color="#ff6600"&gt;) [&lt;/FONT&gt;@[Revised Salary]]/'US Working Days'!$E$3*'US Working Days'!$B$2 AND([@[Allocated Salary]]&amp;gt;0,
[@[Revised Salary]]&amp;gt;0,
[@[Change Effective Date]]&amp;lt;=$AE$1,
[@[End Date]]=0,
'Controls'!$D$4=0,
'Controls'!$E$4=0&lt;FONT color="#ff6600"&gt;) [&lt;/FONT&gt;@[Revised Salary]]/'US Working Days'!$E$3*'US Working Days'!$B$2 AND([@[Allocated Salary]]&amp;gt;0,
[@[Revised Salary]]&amp;gt;=0,
[@[Change Effective Date]]=0,
[@[End Date]]&amp;lt;=$AE$1,
'Controls'!$D$4=0,
'Controls'!$E$4=0&lt;FONT color="#0000ff"&gt;) 0 A&lt;/FONT&gt;ND([@[Allocated Salary]]&amp;gt;0,
[@[Revised Salary]]&amp;gt;=0,
[@[Change Effective Date]]&amp;gt;=0,
[@[End Date]]&amp;lt;=$AE$1,
'Controls'!$D$4=0,
'Controls'!$E$4=0&lt;FONT color="#0000ff"&gt;) 0 A&lt;/FONT&gt;ND([@[Allocated Salary]]&amp;gt;0,
[@[Revised Salary]]&amp;gt;=0,
[@[Change Effective Date]]=0,
[@[End Date]]&amp;gt;$AE$1,
'Controls'!$D$4=0,
'Controls'!$E$4=0&lt;FONT color="#ff6600"&gt;) [&lt;/FONT&gt;@[Allocated Salary]]/'US Working Days'!$E$3*'US Working Days'!$B$2 AND([@[Allocated Salary]]&amp;gt;0,
[@[Revised Salary]]&amp;gt;=0,
[@[Change Effective Date]]&amp;lt;=$AE$1,
[@[End Date]]&amp;gt;$AE$1,
'Controls'!$D$4=0,
'Controls'!$E$4=0&lt;FONT color="#ff6600"&gt;) [&lt;/FONT&gt;@[Revised Salary]]/'US Working Days'!$E$3*'US Working Days'!$B$2 AND([@[Allocated Salary]]&amp;gt;0,
[@[Revised Salary]]&amp;gt;=0,
[@[Change Effective Date]]&amp;gt;$AE$1,
[@[End Date]]&amp;gt;$AE$1,
'Controls'!$D$4=0,
'Controls'!$E$4=0&lt;FONT color="#ff6600"&gt;) [&lt;/FONT&gt;@[Allocated Salary]] &lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;John Napier&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2019 17:54:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Untangle-this-crazy-condtional-DAX-statement/m-p/777103#M3986</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-27T17:54:43Z</dc:date>
    </item>
    <item>
      <title>Re: Untangle this crazy condtional DAX statement</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Untangle-this-crazy-condtional-DAX-statement/m-p/777112#M3988</link>
      <description>&lt;P&gt;Oh, the file is a .xlsb (binary workbook). &amp;nbsp;&lt;/P&gt;&lt;P&gt;Not sure why that file type is used except for performance aspects.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2019 18:06:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Untangle-this-crazy-condtional-DAX-statement/m-p/777112#M3988</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-27T18:06:29Z</dc:date>
    </item>
    <item>
      <title>Re: Untangle this crazy condtional DAX statement</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Untangle-this-crazy-condtional-DAX-statement/m-p/777194#M3990</link>
      <description>&lt;P&gt;Nope, this isnt DAX. This is an excel formula built using a table.&amp;nbsp; Which is why you see [@[...]] structure&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.office.com/en-us/article/using-structured-references-with-excel-tables-f5ed2452-2337-4f71-bed3-c8ae6d2b276e" target="_blank"&gt;https://support.office.com/en-us/article/using-structured-references-with-excel-tables-f5ed2452-2337-4f71-bed3-c8ae6d2b276e&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good luck trying to figure out what that formula is doing.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2019 20:46:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Untangle-this-crazy-condtional-DAX-statement/m-p/777194#M3990</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-27T20:46:40Z</dc:date>
    </item>
    <item>
      <title>Re: Untangle this crazy condtional DAX statement</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Untangle-this-crazy-condtional-DAX-statement/m-p/777215#M3991</link>
      <description>&lt;P&gt;I ran this through the Dax formatter at&amp;nbsp; daxformatter.com and it doesn't format as DAX&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2019 21:26:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Untangle-this-crazy-condtional-DAX-statement/m-p/777215#M3991</guid>
      <dc:creator>kentyler</dc:creator>
      <dc:date>2019-08-27T21:26:11Z</dc:date>
    </item>
    <item>
      <title>Re: Untangle this crazy condtional DAX statement</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Untangle-this-crazy-condtional-DAX-statement/m-p/777978#M4031</link>
      <description>&lt;P&gt;Thanks for looking into this, guys. &amp;nbsp;&lt;/P&gt;&lt;P&gt;I have used basic structured references in Excel, but this method of conditional statement is new to me.&amp;nbsp; What I figure is this is like a nested IF statement listing the conditions withing the AND() followed by a space and the THEN componant.&amp;nbsp; I just haven't seen such syntax.&amp;nbsp; It works though.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;=AND([@[Allocated Salary]]&amp;gt;0,&lt;BR /&gt;[@[Revised Salary]]=0,&lt;BR /&gt;[@[Change Effective Date]]=0,&lt;BR /&gt;[@[End Date]]=0,&lt;BR /&gt;'Controls'!$D$4=0,&lt;BR /&gt;'Controls'!$E$4=0) [@[Allocated Salary]]/'US Working Days'!$E$3*'US Working Days'!$B$2&lt;/P&gt;&lt;P&gt;AND([@[Allocated Salary]]&amp;gt;0,&lt;BR /&gt;[@[Revised Salary]]&amp;gt;0,&lt;BR /&gt;[@[Change Effective Date]]&amp;gt;=$AE$1,&lt;BR /&gt;[@[End Date]]=0,&lt;BR /&gt;'Controls'!$D$4=0,&lt;BR /&gt;'Controls'!$E$4=0) [@[Revised Salary]]/'US Working Days'!$E$3*'US Working Days'!$B$2&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2019 13:28:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Untangle-this-crazy-condtional-DAX-statement/m-p/777978#M4031</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-28T13:28:47Z</dc:date>
    </item>
  </channel>
</rss>

