<?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 function for changing UNICODE values not working correctly. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SWITCH-function-for-changing-UNICODE-values-not-working/m-p/2735989#M83907</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="434727" data-lia-user-login="UNICODE" class="lia-mention lia-mention-user"&gt;UNICODE&lt;/a&gt; , You need to create this face change measure on the measure, I doubt you are creating a column based on column &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;example&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Switch(TRUE(),&lt;BR /&gt;sum('Example Data'[Value]) &amp;gt;=UCLV,UCL,&lt;BR /&gt;sum('Example Data'[Value])&amp;gt;=WUCLV,WUCL,&lt;BR /&gt;sum('Example Data'[Value])&amp;gt;=sigmaV,sigma,good)&lt;/P&gt;</description>
    <pubDate>Tue, 30 Aug 2022 17:19:08 GMT</pubDate>
    <dc:creator>amitchandak</dc:creator>
    <dc:date>2022-08-30T17:19:08Z</dc:date>
    <item>
      <title>SWITCH function for changing UNICODE values not working correctly.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SWITCH-function-for-changing-UNICODE-values-not-working/m-p/2735962#M83903</link>
      <description>&lt;P&gt;Hello Everyone, I have one that has stumped me.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have written a switch statement that will change the UNICODE values of in a calculated column.&amp;nbsp; I would like it to display the LAST value in a card visual to indicate the last state.&amp;nbsp; &amp;nbsp;What I am finding is that it is showing the UNICODE value with the highest value.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have attached a screen shot&amp;nbsp;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I was hoping for it to select the face at the 0.75 value (&lt;SPAN&gt;128531 unicode value)&amp;nbsp; instead it picks the 0.5 value (&lt;/SPAN&gt;&lt;SPAN&gt;128532) as the Last Value.&amp;nbsp; If I pick a higher UNICODE value (128533 for example) then the card will display this value.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Here is the source code for the switch statement.&amp;nbsp; &amp;nbsp;I will attatch the BI file if I can figure out how.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Face Changer Column = 
VAR WUCL=UNICHAR(128531)
VAR UCL=UNICHAR(128530)
VAR sigma=UNICHAR(128532)
VAR good=UNICHAR(128513)
VAR UCLV=0.875
VAR WUCLV=0.625
VAR sigmaV=0.5
Var goodV=0.3
VAR SWITCHER=
Switch(TRUE(),
'Example Data'[Value]&amp;gt;=UCLV,UCL,
'Example Data'[Value]&amp;gt;=WUCLV,WUCL,
'Example Data'[Value]&amp;gt;=sigmaV,sigma,good)

Return SWITCHER&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 17:05:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SWITCH-function-for-changing-UNICODE-values-not-working/m-p/2735962#M83903</guid>
      <dc:creator>UNICODE</dc:creator>
      <dc:date>2022-08-30T17:05:15Z</dc:date>
    </item>
    <item>
      <title>Re: SWITCH function for changing UNICODE values not working correctly.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SWITCH-function-for-changing-UNICODE-values-not-working/m-p/2735989#M83907</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="434727" data-lia-user-login="UNICODE" class="lia-mention lia-mention-user"&gt;UNICODE&lt;/a&gt; , You need to create this face change measure on the measure, I doubt you are creating a column based on column &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;example&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Switch(TRUE(),&lt;BR /&gt;sum('Example Data'[Value]) &amp;gt;=UCLV,UCL,&lt;BR /&gt;sum('Example Data'[Value])&amp;gt;=WUCLV,WUCL,&lt;BR /&gt;sum('Example Data'[Value])&amp;gt;=sigmaV,sigma,good)&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 17:19:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SWITCH-function-for-changing-UNICODE-values-not-working/m-p/2735989#M83907</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-08-30T17:19:08Z</dc:date>
    </item>
    <item>
      <title>Re: SWITCH function for changing UNICODE values not working correctly.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SWITCH-function-for-changing-UNICODE-values-not-working/m-p/2736004#M83912</link>
      <description>&lt;P&gt;Moved this to a reply&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 17:48:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SWITCH-function-for-changing-UNICODE-values-not-working/m-p/2736004#M83912</guid>
      <dc:creator>UNICODE</dc:creator>
      <dc:date>2022-08-30T17:48:18Z</dc:date>
    </item>
    <item>
      <title>Re: SWITCH function for changing UNICODE values not working correctly.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SWITCH-function-for-changing-UNICODE-values-not-working/m-p/2736034#M83914</link>
      <description>&lt;P&gt;This appears to be working now.&amp;nbsp; I did two things.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;1. I moved it to a measure.&amp;nbsp;&lt;BR /&gt;2. I changed the code, adding the MAX function.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;FCMES = 
VAR WUCL=UNICHAR(128531)
VAR UCL=UNICHAR(128530)
VAR sigma=UNICHAR(128532)
VAR good=UNICHAR(128513)
VAR UCLV=0.875
VAR WUCLV=0.625
VAR sigmaV=0.5
Var goodV=0.3
VAR SWITCHER=
Switch(TRUE(),
Max('Example Data'[Value])&amp;gt;=UCLV,UCL,
MAX('Example Data'[Value])&amp;gt;=WUCLV,WUCL,
Max('Example Data'[Value])&amp;gt;=sigmaV,sigma,good)

Return SWITCHER&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Aug 2022 19:16:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SWITCH-function-for-changing-UNICODE-values-not-working/m-p/2736034#M83914</guid>
      <dc:creator>UNICODE</dc:creator>
      <dc:date>2022-08-31T19:16:06Z</dc:date>
    </item>
    <item>
      <title>Re: SWITCH function for changing UNICODE values not working correctly.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SWITCH-function-for-changing-UNICODE-values-not-working/m-p/2736036#M83915</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Initially I had did this as a calculated column.&amp;nbsp;&lt;BR /&gt;&lt;img /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;Using the Sum makes sense to conver it over to a measure, ie it needing a single value to compute.&amp;nbsp; &amp;nbsp;The problem with using SUM is it starts adding the&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Example Data'[Value]&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;together and gives the incorrect results.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;MIN returns the UNICODE with the smallest code value.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MAX always returns the one with the largest code value&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 17:47:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SWITCH-function-for-changing-UNICODE-values-not-working/m-p/2736036#M83915</guid>
      <dc:creator>UNICODE</dc:creator>
      <dc:date>2022-08-30T17:47:14Z</dc:date>
    </item>
  </channel>
</rss>

