<?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 SWITCH conditions are not working as expected in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SWITCH-conditions-are-not-working-as-expected/m-p/4250199#M168277</link>
    <description>&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;I am using SWITCH dax for my scenario and it has multiple conditions.&lt;/P&gt;&lt;P&gt;few conditions are matched and working fine and result is expected. but few conditions are not reflecting the result even the input is entered.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Below the requirements :&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;#1 if "Have we met planned scope YTD with Delivered scope so far?" is "Yes" then Green&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;#2 if "Have we met planned scope YTD with Delivered scope so far?" is "No" and "Is there a catch up plan to meet the target?" is "Yes" then Amber, else Red&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;#3 if "Is the delay caused by customer side or from CG side?" is "Customer" then change the color to Amber even #2 is Red&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;#4 if the deviation of "YTD Effort Spent" is more than 10% of "YTD Effort Planned", it should be Red, if less than 10%, it is amber otherwise Green&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;#5 if the "Total Effort in PD" is more than "YTD Effort Spent"+Effort still needed to complete the project", then green, if deviation is less than 10% then Amber, if it is more than 10% then it is RED&lt;BR /&gt;&lt;FONT size="3"&gt;First 4 points are working fine but 5th is not working , i don't know if it is related to DAX issue or SWITCH function issue.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Calculated column DAX formula&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;Schedule logic = &lt;/EM&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;EM&gt;SWITCH(TRUE(),&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;'Test Delivery Updates'[Have we met planned scope YTD with Delivered scope so far?]="Yes","Green",&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;'Test Delivery Updates'[Have we met planned scope YTD with Delivered scope so far?]="No" &amp;amp;&amp;amp; 'Test Delivery Updates'[Is there a catch up plan to meet the target?]="Yes","Amber",&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;'Test Delivery Updates'[Is the delay caused by customer side or from CG side?]="Customer","Amber",&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;'Test Delivery Updates'[Is the delay caused by customer side or from CG side?]="CG","Red",&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;('Test Delivery Updates'[YTD Effort Spent])&amp;gt;('Test Delivery Updates'[YTD Effort Planned]+'Test Delivery Updates'[YTD Effort Planned]*0.1),"Red",&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;('Test Delivery Updates'[YTD Effort Spent])&amp;lt;('Test Delivery Updates'[YTD Effort Planned]-'Test Delivery Updates'[YTD Effort Planned]*0.1),"Amber",&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;('Test Delivery Updates'[YTD Effort Spent])=('Test Delivery Updates'[YTD Effort Planned]),"Green",&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;('Test Delivery Updates'[Total Effort in PD])&amp;gt;('Test Delivery Updates'[YTD Effort Spent]+'Test Delivery Updates'[Effort still needed to complete the project]),"Green",&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;ABS(('Test Delivery Updates'[Total Effort in PD])-('Test Delivery Updates'[YTD Effort Spent]+'Test Delivery Updates'[Effort still needed to complete the project]))&amp;lt;('Test Delivery Updates'[Total Effort in PD]*0.1),"Amber",&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;ABS(('Test Delivery Updates'[Total Effort in PD])-('Test Delivery Updates'[YTD Effort Spent]+'Test Delivery Updates'[Effort still needed to complete the project]))&amp;gt;('Test Delivery Updates'[Total Effort in PD]*0.1),"Red"&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;Last 3 rows is not working as expected (5th requirement point)&lt;/P&gt;&lt;P&gt;Expected result is "Green , Red, Amber" but it is Showing RED for all the 3 rows.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help to suggest some ideas on this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;DK&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Mon, 21 Oct 2024 06:58:08 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-10-21T06:58:08Z</dc:date>
    <item>
      <title>SWITCH conditions are not working as expected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SWITCH-conditions-are-not-working-as-expected/m-p/4250199#M168277</link>
      <description>&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;I am using SWITCH dax for my scenario and it has multiple conditions.&lt;/P&gt;&lt;P&gt;few conditions are matched and working fine and result is expected. but few conditions are not reflecting the result even the input is entered.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Below the requirements :&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;#1 if "Have we met planned scope YTD with Delivered scope so far?" is "Yes" then Green&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;#2 if "Have we met planned scope YTD with Delivered scope so far?" is "No" and "Is there a catch up plan to meet the target?" is "Yes" then Amber, else Red&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;#3 if "Is the delay caused by customer side or from CG side?" is "Customer" then change the color to Amber even #2 is Red&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;#4 if the deviation of "YTD Effort Spent" is more than 10% of "YTD Effort Planned", it should be Red, if less than 10%, it is amber otherwise Green&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;#5 if the "Total Effort in PD" is more than "YTD Effort Spent"+Effort still needed to complete the project", then green, if deviation is less than 10% then Amber, if it is more than 10% then it is RED&lt;BR /&gt;&lt;FONT size="3"&gt;First 4 points are working fine but 5th is not working , i don't know if it is related to DAX issue or SWITCH function issue.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Calculated column DAX formula&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;Schedule logic = &lt;/EM&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;EM&gt;SWITCH(TRUE(),&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;'Test Delivery Updates'[Have we met planned scope YTD with Delivered scope so far?]="Yes","Green",&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;'Test Delivery Updates'[Have we met planned scope YTD with Delivered scope so far?]="No" &amp;amp;&amp;amp; 'Test Delivery Updates'[Is there a catch up plan to meet the target?]="Yes","Amber",&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;'Test Delivery Updates'[Is the delay caused by customer side or from CG side?]="Customer","Amber",&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;'Test Delivery Updates'[Is the delay caused by customer side or from CG side?]="CG","Red",&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;('Test Delivery Updates'[YTD Effort Spent])&amp;gt;('Test Delivery Updates'[YTD Effort Planned]+'Test Delivery Updates'[YTD Effort Planned]*0.1),"Red",&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;('Test Delivery Updates'[YTD Effort Spent])&amp;lt;('Test Delivery Updates'[YTD Effort Planned]-'Test Delivery Updates'[YTD Effort Planned]*0.1),"Amber",&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;('Test Delivery Updates'[YTD Effort Spent])=('Test Delivery Updates'[YTD Effort Planned]),"Green",&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;('Test Delivery Updates'[Total Effort in PD])&amp;gt;('Test Delivery Updates'[YTD Effort Spent]+'Test Delivery Updates'[Effort still needed to complete the project]),"Green",&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;ABS(('Test Delivery Updates'[Total Effort in PD])-('Test Delivery Updates'[YTD Effort Spent]+'Test Delivery Updates'[Effort still needed to complete the project]))&amp;lt;('Test Delivery Updates'[Total Effort in PD]*0.1),"Amber",&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;ABS(('Test Delivery Updates'[Total Effort in PD])-('Test Delivery Updates'[YTD Effort Spent]+'Test Delivery Updates'[Effort still needed to complete the project]))&amp;gt;('Test Delivery Updates'[Total Effort in PD]*0.1),"Red"&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;Last 3 rows is not working as expected (5th requirement point)&lt;/P&gt;&lt;P&gt;Expected result is "Green , Red, Amber" but it is Showing RED for all the 3 rows.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help to suggest some ideas on this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;DK&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 21 Oct 2024 06:58:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SWITCH-conditions-are-not-working-as-expected/m-p/4250199#M168277</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-10-21T06:58:08Z</dc:date>
    </item>
    <item>
      <title>Re: SWITCH conditions are not working as expected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SWITCH-conditions-are-not-working-as-expected/m-p/4250682#M168294</link>
      <description>&lt;P&gt;The order of conditions is vital here. Are these 'RED' rows meeting a condition before the one you think it should be meeting?&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2024 11:26:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SWITCH-conditions-are-not-working-as-expected/m-p/4250682#M168294</guid>
      <dc:creator>HotChilli</dc:creator>
      <dc:date>2024-10-21T11:26:33Z</dc:date>
    </item>
    <item>
      <title>Re: SWITCH conditions are not working as expected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SWITCH-conditions-are-not-working-as-expected/m-p/4250712#M168297</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="81111" data-lia-user-login="HotChilli" class="lia-mention lia-mention-user"&gt;HotChilli&lt;/a&gt;&amp;nbsp;Yes i have updated the input based on the conditions .&lt;/P&gt;&lt;P&gt;Now here you can see after rearranging the condition orders :&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;Last 3 rows are giving exact result and all RED comes for previous 3 rows.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Rearranged DAX conditions :&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;&lt;EM&gt;Schedule logic =&lt;/EM&gt;&lt;/FONT&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;&lt;EM&gt;SWITCH(TRUE(),&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;&lt;EM&gt;('Test Delivery Updates'[Total Effort in PD])&amp;gt;('Test Delivery Updates'[YTD Effort Spent]+'Test Delivery Updates'[Effort still needed to complete the project]),"Green",&lt;/EM&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;&lt;EM&gt;ABS(('Test Delivery Updates'[Total Effort in PD])-('Test Delivery Updates'[YTD Effort Spent]+'Test Delivery Updates'[Effort still needed to complete the project]))&amp;lt;('Test Delivery Updates'[Total Effort in PD]*0.1),"Amber",&lt;/EM&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;&lt;EM&gt;ABS(('Test Delivery Updates'[Total Effort in PD])-('Test Delivery Updates'[YTD Effort Spent]+'Test Delivery Updates'[Effort still needed to complete the project]))&amp;gt;('Test Delivery Updates'[Total Effort in PD]*0.1),"Red",&lt;/EM&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;&lt;EM&gt;'Test Delivery Updates'[Have we met planned scope YTD with Delivered scope so far?]="Yes","Green",&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;&lt;EM&gt;'Test Delivery Updates'[Have we met planned scope YTD with Delivered scope so far?]="No" &amp;amp;&amp;amp; 'Test Delivery Updates'[Is there a catch up plan to meet the target?]="Yes","Amber",&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;&lt;EM&gt;'Test Delivery Updates'[Is the delay caused by customer side or from CG side?]="Customer","Amber",&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;&lt;EM&gt;'Test Delivery Updates'[Is the delay caused by customer side or from CG side?]="CG","Red",&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;&lt;EM&gt;'Test Delivery Updates'[YTD Effort Spent]&amp;gt;'Test Delivery Updates'[YTD Effort Planned]+'Test Delivery Updates'[YTD Effort Planned]*0.1,"Red",&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;&lt;EM&gt;'Test Delivery Updates'[YTD Effort Spent]&amp;lt;'Test Delivery Updates'[YTD Effort Planned]-'Test Delivery Updates'[YTD Effort Planned]*0.1,"Amber",&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;&lt;EM&gt;'Test Delivery Updates'[YTD Effort Spent]='Test Delivery Updates'[YTD Effort Planned],"Green"&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 21 Oct 2024 11:40:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SWITCH-conditions-are-not-working-as-expected/m-p/4250712#M168297</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-10-21T11:40:58Z</dc:date>
    </item>
    <item>
      <title>Re: SWITCH conditions are not working as expected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SWITCH-conditions-are-not-working-as-expected/m-p/4250974#M168312</link>
      <description>&lt;P&gt;Right, so you have a situation where either:&lt;/P&gt;
&lt;P&gt;a) The logic conditions are in the wrong order,&lt;/P&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;b) The logic conditions are not compatible with each other (it doesn't matter what order you put them in, you will still get wrong results in some rows)&lt;/P&gt;
&lt;P&gt;--&lt;/P&gt;
&lt;P&gt;You might try drawing up a flow chart to see if you can get the logic right before writing the DAX for it.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2024 14:21:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SWITCH-conditions-are-not-working-as-expected/m-p/4250974#M168312</guid>
      <dc:creator>HotChilli</dc:creator>
      <dc:date>2024-10-21T14:21:35Z</dc:date>
    </item>
    <item>
      <title>Re: SWITCH conditions are not working as expected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SWITCH-conditions-are-not-working-as-expected/m-p/4252045#M168385</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to your statement, I think you can try code as below.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Schedule logic = 
IF (
    'Test Delivery Updates'[YTD Effort Planned] + 'Test Delivery Updates'[YTD Effort Spent] &amp;gt; 0
        &amp;amp;&amp;amp; 'Test Delivery Updates'[YTD Effort Planned] * 'Test Delivery Updates'[YTD Effort Spent] &amp;lt;&amp;gt; 0,
    SWITCH (
        TRUE (),
        ( 'Test Delivery Updates'[YTD Effort Spent] ) &amp;gt; ( 'Test Delivery Updates'[YTD Effort Planned] + 'Test Delivery Updates'[YTD Effort Planned] * 0.1 ), "Red",
        ( 'Test Delivery Updates'[YTD Effort Spent] ) &amp;lt; ( 'Test Delivery Updates'[YTD Effort Planned] - 'Test Delivery Updates'[YTD Effort Planned] * 0.1 ), "Amber",
        ( 'Test Delivery Updates'[YTD Effort Spent] ) = ( 'Test Delivery Updates'[YTD Effort Planned] ), "Green"
    ),
    SWITCH (
        TRUE (),
        'Test Delivery Updates'[Have we met planned scope YTD with Delivered scope so far?] = "Yes", "Green",
        'Test Delivery Updates'[Have we met planned scope YTD with Delivered scope so far?] = "No"
            &amp;amp;&amp;amp; 'Test Delivery Updates'[Is there a catch up plan to meet the target?] = "Yes", "Amber",
        'Test Delivery Updates'[Is the delay caused by customer side or from CG side?] = "Customer", "Amber",
        'Test Delivery Updates'[Is the delay caused by customer side or from CG side?] = "CG", "Red",
        ( 'Test Delivery Updates'[Total Effort in PD] ) &amp;gt; ( 'Test Delivery Updates'[YTD Effort Spent] + 'Test Delivery Updates'[Effort still needed to complete the project] ), "Green",
        ABS ( ( 'Test Delivery Updates'[Total Effort in PD] ) - ( 'Test Delivery Updates'[YTD Effort Spent] + 'Test Delivery Updates'[Effort still needed to complete the project] ) ) &amp;lt; ( 'Test Delivery Updates'[Total Effort in PD] * 0.1 ), "Amber",
        ABS ( ( 'Test Delivery Updates'[Total Effort in PD] ) - ( 'Test Delivery Updates'[YTD Effort Spent] + 'Test Delivery Updates'[Effort still needed to complete the project] ) ) &amp;gt; ( 'Test Delivery Updates'[Total Effort in PD] * 0.1 ), "Red"
    )
)&lt;/LI-CODE&gt;
&lt;P&gt;Result is as below.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2024 06:55:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SWITCH-conditions-are-not-working-as-expected/m-p/4252045#M168385</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-10-22T06:55:36Z</dc:date>
    </item>
    <item>
      <title>Re: SWITCH conditions are not working as expected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SWITCH-conditions-are-not-working-as-expected/m-p/4253968#M168504</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp; Thanks a lot for this solution &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It works now and will change the input and check for the output .&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2024 08:45:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SWITCH-conditions-are-not-working-as-expected/m-p/4253968#M168504</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-10-23T08:45:42Z</dc:date>
    </item>
  </channel>
</rss>

