<?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: Power BI Column Query with Multiple Conditions in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Column-Query-with-Multiple-Conditions/m-p/2984421#M100108</link>
    <description>&lt;P&gt;Thank you for the help. I tried something similar but could not get it to work. Your example was what I needed.&lt;/P&gt;</description>
    <pubDate>Thu, 22 Dec 2022 14:00:27 GMT</pubDate>
    <dc:creator>Lorrec</dc:creator>
    <dc:date>2022-12-22T14:00:27Z</dc:date>
    <item>
      <title>Power BI Column Query with Multiple Conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Column-Query-with-Multiple-Conditions/m-p/2981792#M99969</link>
      <description>&lt;P&gt;I have a Power BI dashboard that I built several years ago. I have a column in the dashboard that looks at the sixth letter in the server name. Based on it. The columns determine the environment. For example, for a server with the name serverx123, the environment would be Env1.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I got a recent request to update the dashboard to show Room1 for servers with specific names. For example, serverx123 should now display in the dashboard as Room1 for their environment, not Env1. However, any server not explicitly listed should follow the switch flow. For example, serverx123 would be Room1, but serverx245 would be Env1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried multiple edits to my column DAX query but keep hitting roadblocks. Can someone point me in the right direction? Thank you for the help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My Column&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Column = SWITCH(REPLACE(LEFT(TRIM('&lt;/SPAN&gt;&lt;SPAN&gt;Append'[Server Name]), 6), 1, 5, ""), "X", "Env1", "L", "Env2","No Env")&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2022 12:59:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Column-Query-with-Multiple-Conditions/m-p/2981792#M99969</guid>
      <dc:creator>Lorrec</dc:creator>
      <dc:date>2022-12-21T12:59:56Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI Column Query with Multiple Conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Column-Query-with-Multiple-Conditions/m-p/2983690#M100063</link>
      <description>&lt;P&gt;Hi &amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="489722" data-lia-user-login="Lorrec" class="lia-mention lia-mention-user"&gt;Lorrec&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think you could nest another if statement, like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Column =
IF (
    'Append'[Server Name] = "serverx123",
    "Room1",
    SWITCH (
        REPLACE ( LEFT ( TRIM ( 'Append'[Server Name] ), 6 ), 1, 5, "" ),
        "X", "Env1",
        "L", "Env2",
        "No Env"
    )
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Gallen Luo&lt;BR /&gt;If this post &lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2022 08:29:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Column-Query-with-Multiple-Conditions/m-p/2983690#M100063</guid>
      <dc:creator>v-jialluo-msft</dc:creator>
      <dc:date>2022-12-22T08:29:43Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI Column Query with Multiple Conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Column-Query-with-Multiple-Conditions/m-p/2984421#M100108</link>
      <description>&lt;P&gt;Thank you for the help. I tried something similar but could not get it to work. Your example was what I needed.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2022 14:00:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Column-Query-with-Multiple-Conditions/m-p/2984421#M100108</guid>
      <dc:creator>Lorrec</dc:creator>
      <dc:date>2022-12-22T14:00:27Z</dc:date>
    </item>
  </channel>
</rss>

