<?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 Create calculated field using MAXX with Multiple IF conditions in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-calculated-field-using-MAXX-with-Multiple-IF-conditions/m-p/3876621#M151372</link>
    <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to create a caalculated field using MAX &amp;amp; IF conditins if text is matching in a columns (Issue Type &amp;amp; Label) then add the text value for all the ID's in each row.&lt;BR /&gt;&lt;U&gt;&lt;STRONG&gt;Logic:&lt;/STRONG&gt;&lt;/U&gt;&lt;BR /&gt;IF "Issue Type"="Feature" &amp;amp; "Label" = "Pilot_Phd" THEN "Pilot"&lt;BR /&gt;EleseIF&lt;BR /&gt;IF "Issue Type"="Feature" &amp;amp; "Label" = "Testing" THEN "Test"&lt;BR /&gt;ElseIF&lt;BR /&gt;IF "Issue Type"="Feature" &amp;amp; "Label" = "Check" THEN "Control"&lt;BR /&gt;Else&lt;BR /&gt;"BAU" ENDIF&lt;BR /&gt;&lt;BR /&gt;Please see the attached screenshot for expected "Output" in column "D".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried below DAX, but it's not giving the result for all the rows.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please giude me to resolve this issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;DAX:&lt;/STRONG&gt;&lt;/U&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Output =&lt;BR /&gt;&lt;BR /&gt;VAR MaxProject =&lt;/P&gt;&lt;P&gt;SWITCH(&lt;/P&gt;&lt;P&gt;TableName [Issue Type]="Feature" &amp;amp;&amp;amp; TableName [Label]="Pilot_Phd", "Pilot",&lt;/P&gt;&lt;P&gt;TableName [Issue Type]="Feature" &amp;amp;&amp;amp; TableName [Label]="Testing", "Test",&lt;/P&gt;&lt;P&gt;TableName[Issue Type]="Feature" &amp;amp;&amp;amp; TableName [Label]="Check", "Control",&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;TRUE(),&lt;/P&gt;&lt;P&gt;RETURN&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;BLANK())&lt;/P&gt;&lt;P&gt;IF(TableName [ID]=TableName[ID], CALCULATE (MAXX (&lt;/P&gt;&lt;P&gt;FILTER (TableName, TableName [ID]=TableName[ID]), MaxProject)), "BAU")&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;U&gt;&lt;STRONG&gt;Screenshot:&lt;BR /&gt;&lt;img /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 29 Apr 2024 18:33:00 GMT</pubDate>
    <dc:creator>rkottap</dc:creator>
    <dc:date>2024-04-29T18:33:00Z</dc:date>
    <item>
      <title>Create calculated field using MAXX with Multiple IF conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-calculated-field-using-MAXX-with-Multiple-IF-conditions/m-p/3876621#M151372</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to create a caalculated field using MAX &amp;amp; IF conditins if text is matching in a columns (Issue Type &amp;amp; Label) then add the text value for all the ID's in each row.&lt;BR /&gt;&lt;U&gt;&lt;STRONG&gt;Logic:&lt;/STRONG&gt;&lt;/U&gt;&lt;BR /&gt;IF "Issue Type"="Feature" &amp;amp; "Label" = "Pilot_Phd" THEN "Pilot"&lt;BR /&gt;EleseIF&lt;BR /&gt;IF "Issue Type"="Feature" &amp;amp; "Label" = "Testing" THEN "Test"&lt;BR /&gt;ElseIF&lt;BR /&gt;IF "Issue Type"="Feature" &amp;amp; "Label" = "Check" THEN "Control"&lt;BR /&gt;Else&lt;BR /&gt;"BAU" ENDIF&lt;BR /&gt;&lt;BR /&gt;Please see the attached screenshot for expected "Output" in column "D".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried below DAX, but it's not giving the result for all the rows.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please giude me to resolve this issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;DAX:&lt;/STRONG&gt;&lt;/U&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Output =&lt;BR /&gt;&lt;BR /&gt;VAR MaxProject =&lt;/P&gt;&lt;P&gt;SWITCH(&lt;/P&gt;&lt;P&gt;TableName [Issue Type]="Feature" &amp;amp;&amp;amp; TableName [Label]="Pilot_Phd", "Pilot",&lt;/P&gt;&lt;P&gt;TableName [Issue Type]="Feature" &amp;amp;&amp;amp; TableName [Label]="Testing", "Test",&lt;/P&gt;&lt;P&gt;TableName[Issue Type]="Feature" &amp;amp;&amp;amp; TableName [Label]="Check", "Control",&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;TRUE(),&lt;/P&gt;&lt;P&gt;RETURN&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;BLANK())&lt;/P&gt;&lt;P&gt;IF(TableName [ID]=TableName[ID], CALCULATE (MAXX (&lt;/P&gt;&lt;P&gt;FILTER (TableName, TableName [ID]=TableName[ID]), MaxProject)), "BAU")&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;U&gt;&lt;STRONG&gt;Screenshot:&lt;BR /&gt;&lt;img /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Apr 2024 18:33:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-calculated-field-using-MAXX-with-Multiple-IF-conditions/m-p/3876621#M151372</guid>
      <dc:creator>rkottap</dc:creator>
      <dc:date>2024-04-29T18:33:00Z</dc:date>
    </item>
    <item>
      <title>Re: Create calculated field using MAXX with Multiple IF conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-calculated-field-using-MAXX-with-Multiple-IF-conditions/m-p/3876659#M151375</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="733918" data-lia-user-login="rkottap" class="lia-mention lia-mention-user"&gt;rkottap&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please try&lt;/P&gt;
&lt;P&gt;Output =&lt;BR /&gt;VAR CurrentIDTable =&lt;BR /&gt;CALCULATETABLE ( TableName, ALLEXCEPT ( TableName, TableName[ID] ) )&lt;BR /&gt;VAR FeatureTypeRecord =&lt;BR /&gt;FILTER ( TableName, TableName[Issue Type] = "Feature" )&lt;BR /&gt;VAR FeatureLabel =&lt;BR /&gt;MAXX ( FeatureTypeRecord, TableName[Label] )&lt;BR /&gt;VAR Result =&lt;BR /&gt;SWITCH (&lt;BR /&gt;FeatureLable,&lt;BR /&gt;"Pilot_Phd", "Pilot",&lt;BR /&gt;"Testing", "Test",&lt;BR /&gt;"Check", "Control",&lt;BR /&gt;"BAU"&lt;BR /&gt;)&lt;BR /&gt;RETURN&lt;BR /&gt;Result&lt;/P&gt;</description>
      <pubDate>Mon, 29 Apr 2024 18:47:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-calculated-field-using-MAXX-with-Multiple-IF-conditions/m-p/3876659#M151375</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2024-04-29T18:47:46Z</dc:date>
    </item>
    <item>
      <title>Re: Create calculated field using MAXX with Multiple IF conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-calculated-field-using-MAXX-with-Multiple-IF-conditions/m-p/3877996#M151412</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Thank you for your response.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's not returning the values as per the conditions.&amp;nbsp;&lt;BR /&gt;It's adding text "BAU" for all the rows in table.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2024 06:37:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-calculated-field-using-MAXX-with-Multiple-IF-conditions/m-p/3877996#M151412</guid>
      <dc:creator>rkottap</dc:creator>
      <dc:date>2024-04-30T06:37:29Z</dc:date>
    </item>
    <item>
      <title>Re: Create calculated field using MAXX with Multiple IF conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-calculated-field-using-MAXX-with-Multiple-IF-conditions/m-p/3878022#M151413</link>
      <description>&lt;P&gt;I have added the VAR name in the second VAR line, where Table name is used;&lt;BR /&gt;&lt;BR /&gt;Now it's working fine, Thank you for your help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Output =&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;VAR CurrentIDTable =&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CALCULATETABLE ( TableName, ALLEXCEPT ( TableName, TableName[ID] ) )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;VAR FeatureTypeRecord =&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FILTER ( CurrentIDTable , TableName[Issue Type] = "Feature" )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;VAR FeatureLabel =&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MAXX ( FeatureTypeRecord, TableName[Label] )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;VAR Result =&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;SWITCH (&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FeatureLable,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"Pilot_Phd", "Pilot",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"Testing", "Test",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"Check", "Control",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"BAU"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Result&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2024 06:43:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-calculated-field-using-MAXX-with-Multiple-IF-conditions/m-p/3878022#M151413</guid>
      <dc:creator>rkottap</dc:creator>
      <dc:date>2024-04-30T06:43:35Z</dc:date>
    </item>
    <item>
      <title>Re: Create calculated field using MAXX with Multiple IF conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-calculated-field-using-MAXX-with-Multiple-IF-conditions/m-p/3878218#M151416</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="733918" data-lia-user-login="rkottap" class="lia-mention lia-mention-user"&gt;rkottap&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks to&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp; for the reply, please allow me to provide another insight:&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;1. Create a calculated column.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Output =
VAR MaxProject = SWITCH(
TRUE(),
'Table'[Issue Type] = "Feature" &amp;amp;&amp;amp; 'Table'[Label] = "Pilot_Phd", "Pilot",
'Table'[Issue Type] = "Feature" &amp;amp;&amp;amp; 'Table'[Label] = "Testing", "Test",
'Table'[Issue Type] = "Feature" &amp;amp;&amp;amp; 'Table'[Label] = "Check", "Control")
RETURN

MaxProject&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. Create the calculated column again to get the final result.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Column =
VAR _out = CALCULATE(MAX('Table'[Output]),FILTER(ALL('Table'),'Table'[ID] = EARLIER('Table'[ID])))
RETURN
IF(_out = BLANK(),"BAU",_out)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3. You can click the little eye next to the column name to hide unnecessary columns.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;If your Current Period does not refer to this, please clarify in a follow-up reply.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Clara Gong&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2024 07:44:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-calculated-field-using-MAXX-with-Multiple-IF-conditions/m-p/3878218#M151416</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-04-30T07:44:46Z</dc:date>
    </item>
    <item>
      <title>Re: Create calculated field using MAXX with Multiple IF conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-calculated-field-using-MAXX-with-Multiple-IF-conditions/m-p/3879769#M151460</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="733918" data-lia-user-login="rkottap" class="lia-mention lia-mention-user"&gt;rkottap&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;You are right. That was a typo mistake.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2024 14:00:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-calculated-field-using-MAXX-with-Multiple-IF-conditions/m-p/3879769#M151460</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2024-04-30T14:00:41Z</dc:date>
    </item>
  </channel>
</rss>

