<?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(TRUE(), Contains - specific conditions in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SWITCH-TRUE-Contains-specific-conditions/m-p/3068081#M106314</link>
    <description>&lt;P&gt;The variable [Sub-sector?] in the table 'fact_countries' contains different job titles that need to be graded according to their perceived Risk into: "High Risk", "Medium "&amp;nbsp; and "Low Risk". Everything else goes into " not specified".&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why is the below code setting all varibles to High Risk?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Risk =&lt;/P&gt;&lt;P&gt;SWITCH(TRUE(),&lt;/P&gt;&lt;P&gt;&amp;nbsp; CONTAINS(fact_countries, fact_countries[Sub-sector?],"Derivative issuer")&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;|| CONTAINS(fact_countries, fact_countries[Sub-sector?],"Derivatives issuer")&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; || CONTAINS(fact_countries, fact_countries[Sub-sector?],"Derivatives issuerOther")&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; ,"High Risk",&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;CONTAINS(fact_countries, fact_countries[Sub-sector?],"Fund manager")&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; || CONTAINS(fact_countries, fact_countries[Sub-sector?],"Fund managerBrokers / Custodians")&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; || CONTAINS(fact_countries, fact_countries[Sub-sector?],"Fund managerBrokers / CustodiansDIMS provider")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ,"Medium Risk",&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;CONTAINS(fact_countries, fact_countries[Sub-sector?],"Issuer of securities")&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; || CONTAINS(fact_countries, fact_countries[Sub-sector?],"Other")&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; || CONTAINS(fact_countries, fact_countries[Sub-sector?],"Trustee corporation / Licensed supervisor")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ,"Low Risk",&lt;/P&gt;&lt;P&gt;&amp;nbsp; "Not specified"&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;</description>
    <pubDate>Wed, 08 Feb 2023 07:22:15 GMT</pubDate>
    <dc:creator>acg</dc:creator>
    <dc:date>2023-02-08T07:22:15Z</dc:date>
    <item>
      <title>SWITCH(TRUE(), Contains - specific conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SWITCH-TRUE-Contains-specific-conditions/m-p/3068081#M106314</link>
      <description>&lt;P&gt;The variable [Sub-sector?] in the table 'fact_countries' contains different job titles that need to be graded according to their perceived Risk into: "High Risk", "Medium "&amp;nbsp; and "Low Risk". Everything else goes into " not specified".&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why is the below code setting all varibles to High Risk?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Risk =&lt;/P&gt;&lt;P&gt;SWITCH(TRUE(),&lt;/P&gt;&lt;P&gt;&amp;nbsp; CONTAINS(fact_countries, fact_countries[Sub-sector?],"Derivative issuer")&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;|| CONTAINS(fact_countries, fact_countries[Sub-sector?],"Derivatives issuer")&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; || CONTAINS(fact_countries, fact_countries[Sub-sector?],"Derivatives issuerOther")&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; ,"High Risk",&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;CONTAINS(fact_countries, fact_countries[Sub-sector?],"Fund manager")&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; || CONTAINS(fact_countries, fact_countries[Sub-sector?],"Fund managerBrokers / Custodians")&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; || CONTAINS(fact_countries, fact_countries[Sub-sector?],"Fund managerBrokers / CustodiansDIMS provider")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ,"Medium Risk",&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;CONTAINS(fact_countries, fact_countries[Sub-sector?],"Issuer of securities")&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; || CONTAINS(fact_countries, fact_countries[Sub-sector?],"Other")&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; || CONTAINS(fact_countries, fact_countries[Sub-sector?],"Trustee corporation / Licensed supervisor")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ,"Low Risk",&lt;/P&gt;&lt;P&gt;&amp;nbsp; "Not specified"&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 07:22:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SWITCH-TRUE-Contains-specific-conditions/m-p/3068081#M106314</guid>
      <dc:creator>acg</dc:creator>
      <dc:date>2023-02-08T07:22:15Z</dc:date>
    </item>
    <item>
      <title>Re: SWITCH(TRUE(), Contains - specific conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SWITCH-TRUE-Contains-specific-conditions/m-p/3068133#M106318</link>
      <description>&lt;P&gt;I was wrong: IT WORKS. I leave it here for reference.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 07:36:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SWITCH-TRUE-Contains-specific-conditions/m-p/3068133#M106318</guid>
      <dc:creator>acg</dc:creator>
      <dc:date>2023-02-08T07:36:10Z</dc:date>
    </item>
  </channel>
</rss>

