<?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: Compare master column to two other columns in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-master-column-to-two-other-columns/m-p/2299436#M56754</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="343431" data-lia-user-login="ValtteriN" class="lia-mention lia-mention-user"&gt;ValtteriN&lt;/a&gt;I tried your method and here is what it gave me:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;That's the code...here is the full error message:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Here is what my calculated columns look like (both CompetitorSwitch and AlumniSwitch are set up the same):&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 24 Jan 2022 21:50:46 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-01-24T21:50:46Z</dc:date>
    <item>
      <title>Compare master column to two other columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-master-column-to-two-other-columns/m-p/2299299#M56743</link>
      <description>&lt;P&gt;I haven't quite found my exact issue in an existing forum post; if there's something already out there on this topic I'd be happy to take a look.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table that contains a list of Contact IDs - each numerical ID corresponds to a person. I have two other tables with active relationships to this table - one is a table that has a list of Contact IDs for competitors, and one that is a table that has a list of Contact IDs for alumni.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my All Contacts table, I have created two calculated columns (CompetitorSwitch and AlumniSwitch) to identify the status of each contact for these two categories:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;What I'm trying to do here is create a new column (or measure if that makes more sense) that tells me when a contact is BOTH a competitor and an alumni. I've tried IF statements, SWITCH/TRUE() statements, calculated tables...it's all failed me. I'm not sure if it's a mistake at this stage, or if I messed up by creating the two SWITCH columns first. You'll notice in the data model screenshot that the Alumni and Competitor tables do not have an active relationship, ruling out RELATED and similar functions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm completely stuck...open to ideas, and can add more info on the data model if needed. Thanks in advance!&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>Mon, 24 Jan 2022 20:01:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-master-column-to-two-other-columns/m-p/2299299#M56743</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-01-24T20:01:59Z</dc:date>
    </item>
    <item>
      <title>Re: Compare master column to two other columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-master-column-to-two-other-columns/m-p/2299339#M56749</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;Might I inquire how your IF and SWITCH tries failed? The basic formula for two IF conditions is as follows:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;True Temperature = &lt;/SPAN&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;AND&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Temperature[Temperature]&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"Cold"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;Temperature[Temp2]&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"Cold"&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;"Very Cold"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;Temperature[Temp2]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;Example data:&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;If this pattern doesn't work ping me with&amp;nbsp;@&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 24 Jan 2022 20:32:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-master-column-to-two-other-columns/m-p/2299339#M56749</guid>
      <dc:creator>ValtteriN</dc:creator>
      <dc:date>2022-01-24T20:32:12Z</dc:date>
    </item>
    <item>
      <title>Re: Compare master column to two other columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-master-column-to-two-other-columns/m-p/2299436#M56754</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="343431" data-lia-user-login="ValtteriN" class="lia-mention lia-mention-user"&gt;ValtteriN&lt;/a&gt;I tried your method and here is what it gave me:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;That's the code...here is the full error message:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Here is what my calculated columns look like (both CompetitorSwitch and AlumniSwitch are set up the same):&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jan 2022 21:50:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-master-column-to-two-other-columns/m-p/2299436#M56754</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-01-24T21:50:46Z</dc:date>
    </item>
    <item>
      <title>Re: Compare master column to two other columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-master-column-to-two-other-columns/m-p/2300219#M56794</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;This error can usually be resolved by using MAX() arounf your columns. E.g.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;True Temperature = &lt;/SPAN&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;AND&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;STRONG&gt;max&lt;/STRONG&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Temperature[Temperature]&lt;/SPAN&gt;&lt;SPAN&gt;)=&lt;/SPAN&gt;&lt;SPAN&gt;"Cold"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;STRONG&gt;max&lt;/STRONG&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Temperature[Temp2]&lt;/SPAN&gt;&lt;SPAN&gt;)=&lt;/SPAN&gt;&lt;SPAN&gt;"Cold"&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;"Very Cold"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;Temperature[Temp2]&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 25 Jan 2022 06:39:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-master-column-to-two-other-columns/m-p/2300219#M56794</guid>
      <dc:creator>ValtteriN</dc:creator>
      <dc:date>2022-01-25T06:39:24Z</dc:date>
    </item>
    <item>
      <title>Re: Compare master column to two other columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-master-column-to-two-other-columns/m-p/2301851#M56868</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="343431" data-lia-user-login="ValtteriN" class="lia-mention lia-mention-user"&gt;ValtteriN&lt;/a&gt;&amp;nbsp; Unfortunately this only gives me the ELSE result:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my calculated column now:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jan 2022 21:01:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-master-column-to-two-other-columns/m-p/2301851#M56868</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-01-25T21:01:52Z</dc:date>
    </item>
    <item>
      <title>Re: Compare master column to two other columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-master-column-to-two-other-columns/m-p/2301858#M56870</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="343431" data-lia-user-login="ValtteriN" class="lia-mention lia-mention-user"&gt;ValtteriN&lt;/a&gt;&amp;nbsp; It turns out I was getting too cute with my DAX code. Solved my problem with this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now it's working as it should:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the time and insight!&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jan 2022 21:09:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-master-column-to-two-other-columns/m-p/2301858#M56870</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-01-25T21:09:20Z</dc:date>
    </item>
  </channel>
</rss>

