<?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: SWITCH STATEMENT NOT WORKING in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SWITCH-STATEMENT-NOT-WORKING/m-p/3384859#M127535</link>
    <description>&lt;P&gt;But then, include it in the calculate part. Something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Volume = 
var selectedDate= SELECTEDVALUE('RTY_UY'[EFFECT DATE])

RETURN SWITCH( 'TYU_JP' [REMAINING_FLAG],
"N", 0,
"Y",CALCULATE(COUNT([INT_ID]),DimDate= selectedDate), 
CALCULATE(COUNT([INT_ID]),DimDate= selectedDate))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 17 Aug 2023 09:19:40 GMT</pubDate>
    <dc:creator>mlsx4</dc:creator>
    <dc:date>2023-08-17T09:19:40Z</dc:date>
    <item>
      <title>SWITCH STATEMENT NOT WORKING</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SWITCH-STATEMENT-NOT-WORKING/m-p/3384658#M127524</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could some one help with the below SWITCH statement? Thanks in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Volume = SWITCH( 'RTY_UY'[EFFECT DATE] and 'TYU_JP' [REMAINING_FLAG] = "N", 0 ('RTY_UY'[EFFECT DATE] and 'TYU_JP' [REMAINING_FLAG] = "Y" , COUNT([INT_ID],&amp;nbsp;COUNT([INT_ID]))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ally&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Aug 2023 07:58:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SWITCH-STATEMENT-NOT-WORKING/m-p/3384658#M127524</guid>
      <dc:creator>al1ceDav1n</dc:creator>
      <dc:date>2023-08-17T07:58:05Z</dc:date>
    </item>
    <item>
      <title>Re: SWITCH STATEMENT NOT WORKING</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SWITCH-STATEMENT-NOT-WORKING/m-p/3384725#M127525</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="517725" data-lia-user-login="al1ceDav1n" class="lia-mention lia-mention-user"&gt;al1ceDav1n&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is difficult to know what you're trying to do, but I think you shouldn't include effect date here&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Volume = SWITCH( 'TYU_JP' [REMAINING_FLAG],
"N", 0,
"Y",COUNT([INT_ID], 
COUNT([INT_ID]))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Aug 2023 08:21:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SWITCH-STATEMENT-NOT-WORKING/m-p/3384725#M127525</guid>
      <dc:creator>mlsx4</dc:creator>
      <dc:date>2023-08-17T08:21:39Z</dc:date>
    </item>
    <item>
      <title>Re: SWITCH STATEMENT NOT WORKING</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SWITCH-STATEMENT-NOT-WORKING/m-p/3384854#M127534</link>
      <description>&lt;P&gt;Hi Thanks for your reply&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Effective date is needed to work out the COUNT for INT_ID -&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried this but still no good&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any other idea's much appreciated&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Aug 2023 09:15:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SWITCH-STATEMENT-NOT-WORKING/m-p/3384854#M127534</guid>
      <dc:creator>al1ceDav1n</dc:creator>
      <dc:date>2023-08-17T09:15:45Z</dc:date>
    </item>
    <item>
      <title>Re: SWITCH STATEMENT NOT WORKING</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SWITCH-STATEMENT-NOT-WORKING/m-p/3384859#M127535</link>
      <description>&lt;P&gt;But then, include it in the calculate part. Something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Volume = 
var selectedDate= SELECTEDVALUE('RTY_UY'[EFFECT DATE])

RETURN SWITCH( 'TYU_JP' [REMAINING_FLAG],
"N", 0,
"Y",CALCULATE(COUNT([INT_ID]),DimDate= selectedDate), 
CALCULATE(COUNT([INT_ID]),DimDate= selectedDate))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Aug 2023 09:19:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SWITCH-STATEMENT-NOT-WORKING/m-p/3384859#M127535</guid>
      <dc:creator>mlsx4</dc:creator>
      <dc:date>2023-08-17T09:19:40Z</dc:date>
    </item>
    <item>
      <title>Re: SWITCH STATEMENT NOT WORKING</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SWITCH-STATEMENT-NOT-WORKING/m-p/3384894#M127537</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;For some reason dislikes the "Y" so close&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Aug 2023 09:33:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SWITCH-STATEMENT-NOT-WORKING/m-p/3384894#M127537</guid>
      <dc:creator>al1ceDav1n</dc:creator>
      <dc:date>2023-08-17T09:33:24Z</dc:date>
    </item>
    <item>
      <title>Re: SWITCH STATEMENT NOT WORKING</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SWITCH-STATEMENT-NOT-WORKING/m-p/3385028#M127544</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="517725" data-lia-user-login="al1ceDav1n" class="lia-mention lia-mention-user"&gt;al1ceDav1n&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't understand what's happening. Maybe you need to put a SELECTEDVALUE('TYU_JP' [REMAINING_FLAG]). It is really difficult to figure out the problem without having any information about the structure, the input, the output...&lt;/P&gt;</description>
      <pubDate>Thu, 17 Aug 2023 10:42:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SWITCH-STATEMENT-NOT-WORKING/m-p/3385028#M127544</guid>
      <dc:creator>mlsx4</dc:creator>
      <dc:date>2023-08-17T10:42:29Z</dc:date>
    </item>
  </channel>
</rss>

