<?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: Losing Filtered Dates when using SWITCH in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Losing-Filtered-Dates-when-using-SWITCH/m-p/2359955#M60269</link>
    <description>&lt;P&gt;Hi&amp;nbsp; &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="251189" data-lia-user-login="Jackbaz99" class="lia-mention lia-mention-user"&gt;Jackbaz99&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;You can change dax to the following form&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Rework Target =
If(
ISFILTERED('Index_Part Information'[Additional_Field_2])=false(),0,
SWITCH( TRUE(),
"A P" in allselected('Index_Part Information'[Additional_Field_2]) , 1000 ,
"AP Jet" in allselected('Index_Part Information'[Additional_Field_2]) , 150 ,
"SSO" in allselected('Index_Part Information'[Additional_Field_2]) , 500 ,
"LMT" in allselected('Index_Part Information'[Additional_Field_2]) , 500,0
))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Liu Yang&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;Accept it as the solution&lt;/EM&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
    <pubDate>Fri, 25 Feb 2022 01:36:01 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-02-25T01:36:01Z</dc:date>
    <item>
      <title>Losing Filtered Dates when using SWITCH</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Losing-Filtered-Dates-when-using-SWITCH/m-p/2345360#M59308</link>
      <description>&lt;P&gt;Hi, really struggling with this - but think im nearly there. Code im using is below - and picture is after that.&lt;BR /&gt;&lt;BR /&gt;I am trying to get the newly created target line to follow the filtered dates onthe page - even if no data exists. This is what i have done for the rework cost. by using a calculated &amp;amp; filtered measure. However how can i do this with a switch command? so they line up.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Seems either one or the other is correct. When i filter by additional field this works perfectly - wut when filtering by customer i just want the relevant data to show without my Rework target. Any help would be great&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Rework Target = 
SWITCH( TRUE(),
"A P" in allselected('Index_Part Information'[Additional_Field_2]) , 1000 ,
"AP Jet" in allselected('Index_Part Information'[Additional_Field_2]) , 150 ,
"SSO" in allselected('Index_Part Information'[Additional_Field_2]) , 500 ,
"LMT" in allselected('Index_Part Information'[Additional_Field_2]) , 500,
isblank(selectedvalue('Index_Part Information'[Additional_Field_2])) , 0)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Feb 2022 15:35:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Losing-Filtered-Dates-when-using-SWITCH/m-p/2345360#M59308</guid>
      <dc:creator>Jackbaz99</dc:creator>
      <dc:date>2022-02-17T15:35:57Z</dc:date>
    </item>
    <item>
      <title>Re: Losing Filtered Dates when using SWITCH</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Losing-Filtered-Dates-when-using-SWITCH/m-p/2345572#M59318</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="251189" data-lia-user-login="Jackbaz99" class="lia-mention lia-mention-user"&gt;Jackbaz99&lt;/a&gt; , This Does not seem to have the impact on customer filter . But when nothing is selected you can try like &lt;/P&gt;
&lt;P&gt;Check first line , isfiltered&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Rework Target = 
SWITCH( TRUE(),
not(isfiltered('Index_Part Information'[Additional_Field_2]), 0, 
"A P" in allselected('Index_Part Information'[Additional_Field_2]) , 1000 ,
"AP Jet" in allselected('Index_Part Information'[Additional_Field_2]) , 150 ,
"SSO" in allselected('Index_Part Information'[Additional_Field_2]) , 500 ,
"LMT" in allselected('Index_Part Information'[Additional_Field_2]) , 500,
isblank(selectedvalue('Index_Part Information'[Additional_Field_2])) , 0)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Feb 2022 17:15:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Losing-Filtered-Dates-when-using-SWITCH/m-p/2345572#M59318</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-02-17T17:15:30Z</dc:date>
    </item>
    <item>
      <title>Re: Losing Filtered Dates when using SWITCH</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Losing-Filtered-Dates-when-using-SWITCH/m-p/2345733#M59332</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;it seems to not work - says the () expression is not supported. Otherwise i think this could work - when customer is selected it just stays blank which is what i need. Or is there a way i can put if any customer selected then 0 or something&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Feb 2022 18:55:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Losing-Filtered-Dates-when-using-SWITCH/m-p/2345733#M59332</guid>
      <dc:creator>Jackbaz99</dc:creator>
      <dc:date>2022-02-17T18:55:32Z</dc:date>
    </item>
    <item>
      <title>Re: Losing Filtered Dates when using SWITCH</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Losing-Filtered-Dates-when-using-SWITCH/m-p/2350500#M59635</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;any help with the above please&lt;/P&gt;</description>
      <pubDate>Mon, 21 Feb 2022 08:46:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Losing-Filtered-Dates-when-using-SWITCH/m-p/2350500#M59635</guid>
      <dc:creator>Jackbaz99</dc:creator>
      <dc:date>2022-02-21T08:46:05Z</dc:date>
    </item>
    <item>
      <title>Re: Losing Filtered Dates when using SWITCH</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Losing-Filtered-Dates-when-using-SWITCH/m-p/2359955#M60269</link>
      <description>&lt;P&gt;Hi&amp;nbsp; &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="251189" data-lia-user-login="Jackbaz99" class="lia-mention lia-mention-user"&gt;Jackbaz99&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;You can change dax to the following form&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Rework Target =
If(
ISFILTERED('Index_Part Information'[Additional_Field_2])=false(),0,
SWITCH( TRUE(),
"A P" in allselected('Index_Part Information'[Additional_Field_2]) , 1000 ,
"AP Jet" in allselected('Index_Part Information'[Additional_Field_2]) , 150 ,
"SSO" in allselected('Index_Part Information'[Additional_Field_2]) , 500 ,
"LMT" in allselected('Index_Part Information'[Additional_Field_2]) , 500,0
))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Liu Yang&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;Accept it as the solution&lt;/EM&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Feb 2022 01:36:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Losing-Filtered-Dates-when-using-SWITCH/m-p/2359955#M60269</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-02-25T01:36:01Z</dc:date>
    </item>
  </channel>
</rss>

