<?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 statement using Custom Column in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-statement-using-Custom-Column/m-p/1792416#M37775</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="267852" data-lia-user-login="Payeras_BI" class="lia-mention lia-mention-user"&gt;Payeras_BI&lt;/a&gt;&lt;/P&gt;&lt;P&gt;if you check, we need to have a target of 2,3 and 5 for the same activities ID under the same affiliate owner.&lt;/P&gt;&lt;P&gt;so the logic is that we want all those targets to show on that column so we can calculate the SLA % to indcate that&lt;/P&gt;&lt;P&gt;2=70%&lt;/P&gt;&lt;P&gt;3=85%&lt;/P&gt;&lt;P&gt;5=95%&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i hope this will make it easy for you to understand the logic&lt;/P&gt;</description>
    <pubDate>Mon, 19 Apr 2021 09:54:48 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-04-19T09:54:48Z</dc:date>
    <item>
      <title>If statement using Custom Column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-statement-using-Custom-Column/m-p/1792248#M37771</link>
      <description>&lt;P&gt;Hi Team&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;im trying to get the logic of how i would make this work so that it can dispay everything not just the first command under Custom column, Please help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;if[AffiliateOwnerID]=2 and [ActivityTypeID]=1 or[ActivityTypeID]=2 then 2&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;else if [AffiliateOwnerID]=2 and [ActivityTypeID]=1 or[ActivityTypeID]=2 then 3&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;else if [AffiliateOwnerID]=2 and [ActivityTypeID]=1 or[ActivityTypeID]=2 then 5&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Reason why we need 3 targets under one activity is because we wat to asign each target to a certain percentage like on the screen shot below&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Apr 2021 09:20:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-statement-using-Custom-Column/m-p/1792248#M37771</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-04-19T09:20:47Z</dc:date>
    </item>
    <item>
      <title>Re: If statement using Custom Column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-statement-using-Custom-Column/m-p/1792353#M37774</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Aren't all the if-conditions the same here?&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Apr 2021 09:35:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-statement-using-Custom-Column/m-p/1792353#M37774</guid>
      <dc:creator>Payeras_BI</dc:creator>
      <dc:date>2021-04-19T09:35:55Z</dc:date>
    </item>
    <item>
      <title>Re: If statement using Custom Column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-statement-using-Custom-Column/m-p/1792416#M37775</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="267852" data-lia-user-login="Payeras_BI" class="lia-mention lia-mention-user"&gt;Payeras_BI&lt;/a&gt;&lt;/P&gt;&lt;P&gt;if you check, we need to have a target of 2,3 and 5 for the same activities ID under the same affiliate owner.&lt;/P&gt;&lt;P&gt;so the logic is that we want all those targets to show on that column so we can calculate the SLA % to indcate that&lt;/P&gt;&lt;P&gt;2=70%&lt;/P&gt;&lt;P&gt;3=85%&lt;/P&gt;&lt;P&gt;5=95%&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i hope this will make it easy for you to understand the logic&lt;/P&gt;</description>
      <pubDate>Mon, 19 Apr 2021 09:54:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-statement-using-Custom-Column/m-p/1792416#M37775</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-04-19T09:54:48Z</dc:date>
    </item>
    <item>
      <title>Re: If statement using Custom Column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-statement-using-Custom-Column/m-p/1792515#M37776</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;Not sure if this is what you are looking for but try with this instead to get an idea of why the previous code was not working and take it from there.&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;= if[AffiliateOwnerID]=2 and ([ActivityTypeID]=1 or[ActivityTypeID]=2) then 2
else if [AffiliateOwnerID]=3 and ([ActivityTypeID]=1 or[ActivityTypeID]=2) then 3
else if [AffiliateOwnerID]=5 and ([ActivityTypeID]=1 or[ActivityTypeID]=2) then 5
else null&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Apr 2021 11:10:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-statement-using-Custom-Column/m-p/1792515#M37776</guid>
      <dc:creator>Payeras_BI</dc:creator>
      <dc:date>2021-04-19T11:10:03Z</dc:date>
    </item>
    <item>
      <title>Re: If statement using Custom Column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-statement-using-Custom-Column/m-p/1792643#M37779</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="267852" data-lia-user-login="Payeras_BI" class="lia-mention lia-mention-user"&gt;Payeras_BI&lt;/a&gt;&amp;nbsp;it is for the same affilate owner that have affiliate owner 2, it just have 3 different targets. Do you perhaps have an idea of how we can achieve that&lt;/P&gt;</description>
      <pubDate>Mon, 19 Apr 2021 12:11:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-statement-using-Custom-Column/m-p/1792643#M37779</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-04-19T12:11:59Z</dc:date>
    </item>
    <item>
      <title>Re: If statement using Custom Column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-statement-using-Custom-Column/m-p/1792980#M37783</link>
      <description>&lt;P&gt;Hi again&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Let's see if I understood it now.&lt;/P&gt;
&lt;P&gt;You start with something like this:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;And want to end up with something like this:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;If so, here is my proposal:&lt;/P&gt;
&lt;P&gt;1. Create an Aux table like this one (named Target in my example):&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;2. Add a Custom Column to your main table with the following code:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Table.SelectRows(Target, (X)=&amp;gt; List.Contains({1,2},[ActivityTypeID]) and [AffiliateOwnerID] = 2)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;3. Expand it:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Apr 2021 14:03:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-statement-using-Custom-Column/m-p/1792980#M37783</guid>
      <dc:creator>Payeras_BI</dc:creator>
      <dc:date>2021-04-19T14:03:51Z</dc:date>
    </item>
  </channel>
</rss>

