<?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: IF THEN to select particular columns in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-THEN-to-select-particular-columns/m-p/4267311#M169171</link>
    <description>&lt;P&gt;I think I spoke too soon. That works...if there is no partial address information filled in. The main issue with this solution is that it's not all of the HOME address or all of the BUSINESS address. It could conceivaly piece together parts of both if, for example, the home street is there but the home city is missing. In that case the street is OK but the city is incorrect.&lt;/P&gt;</description>
    <pubDate>Fri, 01 Nov 2024 18:27:02 GMT</pubDate>
    <dc:creator>djerryanderson</dc:creator>
    <dc:date>2024-11-01T18:27:02Z</dc:date>
    <item>
      <title>IF THEN to select particular columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-THEN-to-select-particular-columns/m-p/4267112#M169161</link>
      <description>&lt;P&gt;New to DAX - just started yesterday!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Im trying to build a table that looks at contact info and shows whether or not we will send them a christmas gift. The address, however, should be their home address unless that is NULL...then we pick the business address. To do the NULL check I just look at the home address city and if there is no value there use the business addres. If anyone can help with the correct syntax I would appreciate it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;EVALUATE&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;SELECTCOLUMNS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Contact,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Contact[FirstName],&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Contact[LastName],&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Contact[Christmas_Gift__c],&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Contact,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [Home_Address__City__s] = BLANK,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;SELECTCOLUMNS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Contact,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"Street"&lt;/SPAN&gt;&lt;SPAN&gt;, Contact[MailingStreet],&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"City"&lt;/SPAN&gt;&lt;SPAN&gt;, Contact[MailingCity],&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"State"&lt;/SPAN&gt;&lt;SPAN&gt;, Contact[MailingState],&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"Zip"&lt;/SPAN&gt;&lt;SPAN&gt;, Contact[MailingPostalCode]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;SELECTCOLUMNS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Contact,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"Street"&lt;/SPAN&gt;&lt;SPAN&gt;, Contact[Home_Address__Street__s],&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"City"&lt;/SPAN&gt;&lt;SPAN&gt;, Contact[Home_Address__City__s],&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"State"&lt;/SPAN&gt;&lt;SPAN&gt;, Contact[Home_Address__StateCode__s],&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"Zip"&lt;/SPAN&gt;&lt;SPAN&gt;, Contact[Home_Address__PostalCode__s]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 01 Nov 2024 14:59:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-THEN-to-select-particular-columns/m-p/4267112#M169161</guid>
      <dc:creator>djerryanderson</dc:creator>
      <dc:date>2024-11-01T14:59:59Z</dc:date>
    </item>
    <item>
      <title>Re: IF THEN to select particular columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-THEN-to-select-particular-columns/m-p/4267139#M169162</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="834572" data-lia-user-login="djerryanderson" class="lia-mention lia-mention-user"&gt;djerryanderson&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;Kindly provide the sample input/output in a usable format (excel, csv, table, link to pbix etc.) masking sensitive information.&lt;BR /&gt;&lt;BR /&gt;reference : &lt;A href="https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523#M607150" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523#M607150&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Fri, 01 Nov 2024 15:30:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-THEN-to-select-particular-columns/m-p/4267139#M169162</guid>
      <dc:creator>adudani</dc:creator>
      <dc:date>2024-11-01T15:30:20Z</dc:date>
    </item>
    <item>
      <title>Re: IF THEN to select particular columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-THEN-to-select-particular-columns/m-p/4267163#M169163</link>
      <description>&lt;P&gt;Here are 2 screen snips of the input and expected output. Input has a contact with a home address and business address. Either one or both could have values. I want the HOME address to be the one populated if it is present. If not, use the business adress.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Nov 2024 15:54:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-THEN-to-select-particular-columns/m-p/4267163#M169163</guid>
      <dc:creator>djerryanderson</dc:creator>
      <dc:date>2024-11-01T15:54:19Z</dc:date>
    </item>
    <item>
      <title>Re: IF THEN to select particular columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-THEN-to-select-particular-columns/m-p/4267171#M169164</link>
      <description>&lt;P&gt;Try&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;EVALUATE
SELECTCOLUMNS (
    Contact,
    Contact[FirstName],
    Contact[LastName],
    Contact[Christmas_Gift__c],
    "Street", COALESCE ( Contact[Home_Address__Street__s], Contact[MailingStreet] ),
    "City", COALESCE ( Contact[Home_Address__City__s], Contact[MailingCity] ),
    "State", COALESCE ( Contact[Home_Address__StateCode__s], Contact[MailingState] ),
    "Zip", COALESCE ( Contact[Home_Address__PostalCode__s], Contact[MailingPostalCode] )
)
&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 01 Nov 2024 16:00:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-THEN-to-select-particular-columns/m-p/4267171#M169164</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2024-11-01T16:00:11Z</dc:date>
    </item>
    <item>
      <title>Re: IF THEN to select particular columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-THEN-to-select-particular-columns/m-p/4267267#M169167</link>
      <description>&lt;P&gt;Thank you!!! That worked perfectly.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Nov 2024 17:18:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-THEN-to-select-particular-columns/m-p/4267267#M169167</guid>
      <dc:creator>djerryanderson</dc:creator>
      <dc:date>2024-11-01T17:18:12Z</dc:date>
    </item>
    <item>
      <title>Re: IF THEN to select particular columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-THEN-to-select-particular-columns/m-p/4267311#M169171</link>
      <description>&lt;P&gt;I think I spoke too soon. That works...if there is no partial address information filled in. The main issue with this solution is that it's not all of the HOME address or all of the BUSINESS address. It could conceivaly piece together parts of both if, for example, the home street is there but the home city is missing. In that case the street is OK but the city is incorrect.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Nov 2024 18:27:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-THEN-to-select-particular-columns/m-p/4267311#M169171</guid>
      <dc:creator>djerryanderson</dc:creator>
      <dc:date>2024-11-01T18:27:02Z</dc:date>
    </item>
    <item>
      <title>Re: IF THEN to select particular columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-THEN-to-select-particular-columns/m-p/4269065#M169277</link>
      <description>&lt;P&gt;If you wanted to base the test for each column on just the city you could replace the COALESCE statements with&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;IF( ISBLANK( Contact[Home_Address_City_s]), Contact[MailingStreet], Contact[Home_Address_Street])&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Nov 2024 11:31:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-THEN-to-select-particular-columns/m-p/4269065#M169277</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2024-11-04T11:31:11Z</dc:date>
    </item>
    <item>
      <title>Re: IF THEN to select particular columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-THEN-to-select-particular-columns/m-p/4269222#M169284</link>
      <description>&lt;P&gt;I'm probably just butchering the syntax...but I tried the IF statement as shown above to be all inclusive. I did change the = BLANK to ISBLANK after some googling, it would produce no errors but said "end of input"&amp;nbsp; and yielded no results.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I've tried the solution you suggested and I get "Parameter is not the correct type"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;// Learn more about DAX queries at &lt;A href="https://aka.ms/dax-queries" target="_blank"&gt;https://aka.ms/dax-queries&lt;/A&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 04 Nov 2024 14:05:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-THEN-to-select-particular-columns/m-p/4269222#M169284</guid>
      <dc:creator>djerryanderson</dc:creator>
      <dc:date>2024-11-04T14:05:43Z</dc:date>
    </item>
    <item>
      <title>Re: IF THEN to select particular columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-THEN-to-select-particular-columns/m-p/4269258#M169285</link>
      <description>&lt;P&gt;You need the name of the column before the IF statement&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;EVALUATE
SELECTCOLUMNS (
    Contact,
    Contact[FirstName],
    Contact[LastName],
    Contact[Christmas_Gift__c],
    "Street",
        IF (
            ISBLANK ( Contact[MailingCity] ),
            Contact[Home_Address__Street__s],
            Contact[MailingStreet]
        ),
    "City", COALESCE ( Contact[Home_Address__City__s], Contact[MailingCity] ),
    "State", COALESCE ( Contact[Home_Address__StateCode__s], Contact[MailingState] ),
    "Zip", COALESCE ( Contact[Home_Address__PostalCode__s], Contact[MailingPostalCode] )
)
&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 04 Nov 2024 14:29:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-THEN-to-select-particular-columns/m-p/4269258#M169285</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2024-11-04T14:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: IF THEN to select particular columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-THEN-to-select-particular-columns/m-p/4269266#M169286</link>
      <description>&lt;P&gt;OK that works. Thanks again johnt75. Done a bit of SSRS but just started Power BI last week. Not very good at either but thankfully we have tech forums! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Nov 2024 14:36:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-THEN-to-select-particular-columns/m-p/4269266#M169286</guid>
      <dc:creator>djerryanderson</dc:creator>
      <dc:date>2024-11-04T14:36:00Z</dc:date>
    </item>
  </channel>
</rss>

