<?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: DAX help: switch selectedvalue not working in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-help-switch-selectedvalue-not-working/m-p/2499569#M69064</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="179088" data-lia-user-login="m3tr01d" class="lia-mention lia-mention-user"&gt;m3tr01d&lt;/a&gt;&amp;nbsp;they are measures.&lt;/P&gt;</description>
    <pubDate>Sat, 07 May 2022 00:51:11 GMT</pubDate>
    <dc:creator>Winniethewinner</dc:creator>
    <dc:date>2022-05-07T00:51:11Z</dc:date>
    <item>
      <title>DAX help: switch selectedvalue not working</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-help-switch-selectedvalue-not-working/m-p/2499374#M69059</link>
      <description>&lt;P&gt;Hi everyone, I have a switch DAX. However when I add it to the visual, it shows "Can't display the visual":&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Tickets_WOW_% = 
SWITCH(SELECTEDVALUE(Tickets_Measures[Name]),
"Revenue", IF(AND(Tickets_Measures[This Week]&amp;lt;&amp;gt;BLANK(),Tickets_Measures[Last Week]&amp;lt;&amp;gt;BLANK()), DIVIDE(Tickets_Measures[This Week],Tickets_Measures[Last Week])-1),BLANK(),
"CPN Count", IF(AND(Tickets_Measures[This Week]&amp;lt;&amp;gt;BLANK(),Tickets_Measures[Last Week]&amp;lt;&amp;gt;BLANK()),DIVIDE(Tickets_Measures[This Week],Tickets_Measures[Last Week])-1,BLANK()),
"Rev per CPN", IF(AND(Tickets_Measures[This Week]&amp;lt;&amp;gt;BLANK(),Tickets_Measures[Last Week]&amp;lt;&amp;gt;BLANK()), DIVIDE(Tickets_Measures[This Week],Tickets_Measures[Last Week])-1,BLANK()))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know by adding FORMAT in front of DIVIDE would work, but that doesn't support chart.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would someone please help me to fix it? Thanks.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 May 2022 20:15:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-help-switch-selectedvalue-not-working/m-p/2499374#M69059</guid>
      <dc:creator>Winniethewinner</dc:creator>
      <dc:date>2022-05-06T20:15:37Z</dc:date>
    </item>
    <item>
      <title>Re: DAX help: switch selectedvalue not working</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-help-switch-selectedvalue-not-working/m-p/2499510#M69063</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="370684" data-lia-user-login="Winniethewinner" class="lia-mention lia-mention-user"&gt;Winniethewinner&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Are Tickets_Measures[This Week] and&amp;nbsp; Tickets_Measures[Last Week] Measures or Columns?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 May 2022 23:26:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-help-switch-selectedvalue-not-working/m-p/2499510#M69063</guid>
      <dc:creator>m3tr01d</dc:creator>
      <dc:date>2022-05-06T23:26:37Z</dc:date>
    </item>
    <item>
      <title>Re: DAX help: switch selectedvalue not working</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-help-switch-selectedvalue-not-working/m-p/2499569#M69064</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="179088" data-lia-user-login="m3tr01d" class="lia-mention lia-mention-user"&gt;m3tr01d&lt;/a&gt;&amp;nbsp;they are measures.&lt;/P&gt;</description>
      <pubDate>Sat, 07 May 2022 00:51:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-help-switch-selectedvalue-not-working/m-p/2499569#M69064</guid>
      <dc:creator>Winniethewinner</dc:creator>
      <dc:date>2022-05-07T00:51:11Z</dc:date>
    </item>
    <item>
      <title>Re: DAX help: switch selectedvalue not working</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-help-switch-selectedvalue-not-working/m-p/2499622#M69074</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="370684" data-lia-user-login="Winniethewinner" class="lia-mention lia-mention-user"&gt;Winniethewinner&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the location of the first BLANK() is wrong. However you don't need to specify BLANK () as the 2nd argument of IF as it is blank by default.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Tickets_WOW_% =
SWITCH (
    SELECTEDVALUE ( Tickets_Measures[Name] ),
    "Revenue",
        IF (
            AND ( [This Week] &amp;lt;&amp;gt; BLANK (), [Last Week] &amp;lt;&amp;gt; BLANK () ),
            DIVIDE ( [This Week], [Last Week] ) - 1
        ),
    "CPN Count",
        IF (
            AND ( [This Week] &amp;lt;&amp;gt; BLANK (), [Last Week] &amp;lt;&amp;gt; BLANK () ),
            DIVIDE ( [This Week], [Last Week] ) - 1
        ),
    "Rev per CPN",
        IF (
            AND ( [This Week] &amp;lt;&amp;gt; BLANK (), [Last Week] &amp;lt;&amp;gt; BLANK () ),
            DIVIDE ( [This Week], [Last Week] ) - 1
        )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 07 May 2022 02:59:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-help-switch-selectedvalue-not-working/m-p/2499622#M69074</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-05-07T02:59:30Z</dc:date>
    </item>
    <item>
      <title>Re: DAX help: switch selectedvalue not working</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-help-switch-selectedvalue-not-working/m-p/2503337#M69260</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="370684" data-lia-user-login="Winniethewinner" class="lia-mention lia-mention-user"&gt;Winniethewinner&lt;/a&gt;&amp;nbsp;;&lt;/P&gt;
&lt;P&gt;As Tamerj1 said, your first if() symbol is incorrect; You can modify it. &lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Secondly, all your if formulas are the same. Maybe you can try to simplify it.&lt;/P&gt;
&lt;LI-CODE lang="java"&gt;Tickets_WOW_% =
IF (
    AND (
        Tickets_Measures[This Week] &amp;lt;&amp;gt; BLANK (),
        Tickets_Measures[Last Week] &amp;lt;&amp;gt; BLANK ()
    ),
    DIVIDE ( Tickets_Measures[This Week], Tickets_Measures[Last Week] ) - 1
)
&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Community Support Team _ Yalan Wu&lt;BR /&gt;If this post &lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2022 02:02:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-help-switch-selectedvalue-not-working/m-p/2503337#M69260</guid>
      <dc:creator>v-yalanwu-msft</dc:creator>
      <dc:date>2022-05-10T02:02:30Z</dc:date>
    </item>
    <item>
      <title>Re: DAX help: switch selectedvalue not working</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-help-switch-selectedvalue-not-working/m-p/2505284#M69354</link>
      <description>&lt;P&gt;Thanks for the reply. I've changed the formula as you and&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;suggested, however the WOW_% shows the $ instead %.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;A bit more background, I used calculation group to switch the measures and its respective number format, where Rev shows $ format and count shows as decimal number format.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;If I add FORMAT to&amp;nbsp;Tickets_WOW_% formula and create a chart showing WOW% by dimension, the chart will not display. Any idea how to fix it? Thanks.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2022 15:07:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-help-switch-selectedvalue-not-working/m-p/2505284#M69354</guid>
      <dc:creator>Winniethewinner</dc:creator>
      <dc:date>2022-05-10T15:07:47Z</dc:date>
    </item>
    <item>
      <title>Re: DAX help: switch selectedvalue not working</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-help-switch-selectedvalue-not-working/m-p/2505306#M69355</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="370684" data-lia-user-login="Winniethewinner" class="lia-mention lia-mention-user"&gt;Winniethewinner&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Adding FORMAT will change it into a string. You need to chsnge the format manually to %&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2022 15:14:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-help-switch-selectedvalue-not-working/m-p/2505306#M69355</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-05-10T15:14:57Z</dc:date>
    </item>
    <item>
      <title>Re: DAX help: switch selectedvalue not working</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-help-switch-selectedvalue-not-working/m-p/2505337#M69357</link>
      <description>&lt;P&gt;It doesn't work&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":frowning_face:"&gt;☹️&lt;/span&gt;, and still shows as $.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2022 15:25:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-help-switch-selectedvalue-not-working/m-p/2505337#M69357</guid>
      <dc:creator>Winniethewinner</dc:creator>
      <dc:date>2022-05-10T15:25:29Z</dc:date>
    </item>
    <item>
      <title>Re: DAX help: switch selectedvalue not working</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-help-switch-selectedvalue-not-working/m-p/2506082#M69402</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="370684" data-lia-user-login="Winniethewinner" class="lia-mention lia-mention-user"&gt;Winniethewinner&lt;/a&gt;&amp;nbsp;;&lt;/P&gt;
&lt;P&gt;Are these two the same measure? It doesn't look quite the same unless you change the name.&lt;BR /&gt;Note that you need to change the format of the field itself.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Community Support Team _ Yalan Wu&lt;BR /&gt;If this post &lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Wed, 11 May 2022 01:17:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-help-switch-selectedvalue-not-working/m-p/2506082#M69402</guid>
      <dc:creator>v-yalanwu-msft</dc:creator>
      <dc:date>2022-05-11T01:17:02Z</dc:date>
    </item>
    <item>
      <title>Re: DAX help: switch selectedvalue not working</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-help-switch-selectedvalue-not-working/m-p/2506294#M69411</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="295629" data-lia-user-login="v-yalanwu-msft" class="lia-mention lia-mention-user"&gt;v-yalanwu-msft&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;actually&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="370684" data-lia-user-login="Winniethewinner" class="lia-mention lia-mention-user"&gt;Winniethewinner&lt;/a&gt;&amp;nbsp;is using a calculation group to force $ format ove measures&lt;/P&gt;</description>
      <pubDate>Wed, 11 May 2022 03:15:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-help-switch-selectedvalue-not-working/m-p/2506294#M69411</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-05-11T03:15:32Z</dc:date>
    </item>
    <item>
      <title>Re: DAX help: switch selectedvalue not working</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-help-switch-selectedvalue-not-working/m-p/2507899#M69495</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="295629" data-lia-user-login="v-yalanwu-msft" class="lia-mention lia-mention-user"&gt;v-yalanwu-msft&lt;/a&gt;&amp;nbsp;Those two are the same measures - I did a rename.&lt;/P&gt;&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;yes I use calculation group to force the number format when switching the measures.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the formula for This Week:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;This Week = CALCULATE([Selected_Measure],FILTER(Tickets,Tickets[ISSUE_WEEK]=MAX(Tickets[ISSUE_WEEK])))&lt;/LI-CODE&gt;&lt;P&gt;Here is the formula for Selected_Measure:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Selected_Measure = 
SWITCH(SELECTEDVALUE(Tickets_Measures[Name]),
"Revenue", (SUM(Tickets[Sum(tot_rev)])),
"CPN Count", (SUM(Tickets[TOT_CPN_COUNT])),
"Rev per CPN", (DIVIDE(SUM(Tickets[Sum(tot_rev)]),SUM(Tickets[TOT_CPN_COUNT])))
)&lt;/LI-CODE&gt;&lt;P&gt;The formats are correct except for this WoW % (unless I use FORMAT to make it a string - but this doesn't work in a chart, can only work in a table or matrix). I'd like to see if there is a way to make this WoW % correct format and also works in a chart.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 May 2022 13:32:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-help-switch-selectedvalue-not-working/m-p/2507899#M69495</guid>
      <dc:creator>Winniethewinner</dc:creator>
      <dc:date>2022-05-11T13:32:06Z</dc:date>
    </item>
  </channel>
</rss>

