<?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: Trying to create a column with multiple arguments in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-create-a-column-with-multiple-arguments/m-p/3032708#M103737</link>
    <description>&lt;P&gt;hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try like:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;column = 
SWTICH(
    [NBR],
    6002 || 7102 || 7087, "ON1",
    6063 || 7101 || 6081 || 6080, "AB",
    7103 || 6097 || 6098 || 6093, "ON2",
    6072 || 6064,  "BC", 
    6083,  "SK", 
    "unknown"
)&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 20 Jan 2023 01:44:05 GMT</pubDate>
    <dc:creator>FreemanZ</dc:creator>
    <dc:date>2023-01-20T01:44:05Z</dc:date>
    <item>
      <title>Trying to create a column with multiple arguments</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-create-a-column-with-multiple-arguments/m-p/3032681#M103735</link>
      <description>&lt;P&gt;I'm looking to create a new column with several IF and OR arguments but there is only a max of 2 allowed.&lt;/P&gt;&lt;P&gt;I have seen that || can be used, but I'm unsure of where to use it. I'm relatively new to PowerBi.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Measure = &lt;/SPAN&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;OR&lt;/SPAN&gt;&lt;SPAN&gt;('LT'[NBR]=&lt;/SPAN&gt;&lt;SPAN&gt;6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&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;"ON2"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;OR&lt;/SPAN&gt;&lt;SPAN&gt;('LT'[NBR]=&lt;/SPAN&gt;&lt;SPAN&gt;6072&lt;/SPAN&gt;&lt;SPAN&gt;,'LT'[NBR]=&lt;/SPAN&gt;&lt;SPAN&gt;6064&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;"BC"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;('LT'[NBR]=&lt;/SPAN&gt;&lt;SPAN&gt;6083&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"SK"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"unknown"&lt;/SPAN&gt;&lt;SPAN&gt;)))))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 20 Jan 2023 01:25:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-create-a-column-with-multiple-arguments/m-p/3032681#M103735</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-20T01:25:30Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to create a column with multiple arguments</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-create-a-column-with-multiple-arguments/m-p/3032708#M103737</link>
      <description>&lt;P&gt;hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try like:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;column = 
SWTICH(
    [NBR],
    6002 || 7102 || 7087, "ON1",
    6063 || 7101 || 6081 || 6080, "AB",
    7103 || 6097 || 6098 || 6093, "ON2",
    6072 || 6064,  "BC", 
    6083,  "SK", 
    "unknown"
)&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 20 Jan 2023 01:44:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-create-a-column-with-multiple-arguments/m-p/3032708#M103737</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-01-20T01:44:05Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to create a column with multiple arguments</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-create-a-column-with-multiple-arguments/m-p/3032720#M103738</link>
      <description>&lt;P&gt;I tried it, but keep getting the following error;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;A single value for column 'NBR' in table 'LT' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2023 01:51:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-create-a-column-with-multiple-arguments/m-p/3032720#M103738</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-20T01:51:38Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to create a column with multiple arguments</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-create-a-column-with-multiple-arguments/m-p/3032770#M103743</link>
      <description>&lt;P&gt;I tried inputting a New Column instead of a New Measure and get the following error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Function 'SWITCH' does not support comparing values of type Integer with values of type True/False. Consider using the VALUE or FORMAT function to convert one of the values&lt;/EM&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2023 02:20:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-create-a-column-with-multiple-arguments/m-p/3032770#M103743</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-20T02:20:42Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to create a column with multiple arguments</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-create-a-column-with-multiple-arguments/m-p/3032852#M103755</link>
      <description>&lt;P&gt;hi Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;are you creating the column in LT table?&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2023 02:44:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-create-a-column-with-multiple-arguments/m-p/3032852#M103755</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-01-20T02:44:48Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to create a column with multiple arguments</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-create-a-column-with-multiple-arguments/m-p/3032855#M103756</link>
      <description>&lt;P&gt;Yes I am&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2023 02:46:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-create-a-column-with-multiple-arguments/m-p/3032855#M103756</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-20T02:46:16Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to create a column with multiple arguments</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-create-a-column-with-multiple-arguments/m-p/3032869#M103757</link>
      <description>&lt;P&gt;hi Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;aha, try like:&lt;/P&gt;&lt;DIV&gt;column =&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;SWTICH(&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; TRUE(),&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; [NBR] IN {6002,&amp;nbsp;7102,&amp;nbsp;7087}, "ON1",&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; [NBR] IN {6063,&amp;nbsp;7101,&amp;nbsp;6081,&amp;nbsp;6080}, "AB",&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &lt;SPAN&gt;[NBR] IN {&lt;/SPAN&gt;7103,&amp;nbsp;6097,&amp;nbsp;6098,&amp;nbsp;6093}, "ON2",&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &lt;SPAN&gt;[NBR] IN {&lt;/SPAN&gt;6072,&amp;nbsp;6064}, "BC",&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; [NBR]=6083, "SK",&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; "unknown"&lt;/DIV&gt;&lt;DIV&gt;)&lt;/DIV&gt;</description>
      <pubDate>Fri, 20 Jan 2023 02:53:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-create-a-column-with-multiple-arguments/m-p/3032869#M103757</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-01-20T02:53:29Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to create a column with multiple arguments</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-create-a-column-with-multiple-arguments/m-p/3032890#M103760</link>
      <description>&lt;P&gt;Perfect, thank you!!!&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2023 03:04:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-create-a-column-with-multiple-arguments/m-p/3032890#M103760</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-20T03:04:04Z</dc:date>
    </item>
  </channel>
</rss>

