<?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 in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SWITCH/m-p/752035#M2823</link>
    <description>&lt;P&gt;SWITCH itself cannot change the measures in the chart, it's basically a multiple IF&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;you can use a set of measures like below - in this case the measure will stay the same and just show different value:&lt;/P&gt;
&lt;PRE&gt;Current =
SWITCH (
    SELECTEDVALUE ( Slicer[NCO-AHT] ),
    "NCO", SUM ( Table[aNCO] ),
    "AHT", SUM ( Table[aAHT] ),
    BLANK ()
)&lt;/PRE&gt;
&lt;PRE&gt;Budget=
SWITCH (
    SELECTEDVALUE ( Slicer[NCO-AHT] ),
    "NCO", SUM ( Table[bNCO] ),
    "AHT", SUM ( Table[bAHT] ),
    BLANK ()
)&lt;/PRE&gt;
&lt;P&gt;if you want to keep the setup as is then you may try with bookmarks&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/power-bi/desktop-bookmarks" target="_blank"&gt;https://docs.microsoft.com/en-us/power-bi/desktop-bookmarks&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I'm not sure whether they will remember changing the measures, if not you may create overlapping charts, and set actions to hide the non relevant one. So e.g. if you select NCO in the slicer bookmark will hide all non-NCO charts and make visible only the one with NCO set of measures&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 30 Jul 2019 01:08:53 GMT</pubDate>
    <dc:creator>Stachu</dc:creator>
    <dc:date>2019-07-30T01:08:53Z</dc:date>
    <item>
      <title>SWITCH</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SWITCH/m-p/750828#M2730</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I have a table with columns values as current calls (aNCO), budgeted calls(bNCO), last year calls(LyNCO), current AHT (aAHT), budgeted AHT(bAHT), Last year AHT(LyAHT). i need to use switch function so that if i select NCO it will display data for all calls, if i select AHT, it will display all AHT.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 28 Jul 2019 23:21:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SWITCH/m-p/750828#M2730</guid>
      <dc:creator>PuneetSoni</dc:creator>
      <dc:date>2019-07-28T23:21:56Z</dc:date>
    </item>
    <item>
      <title>Re: SWITCH</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SWITCH/m-p/750842#M2733</link>
      <description>&lt;P&gt;I assume you want to show all 3 measures on the chart, not merged as a single one? If they would be merged, what would be the aggregation method?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;you could try creating&amp;nbsp; 3 measures in this manner:&lt;/P&gt;
&lt;PRE&gt;Current =
SWITCH (
    SELECTEDVALUE ( Slicer[NCO-AHT] ),
    "NCO", SUM ( Table[aNCO] ),
    "AHT", SUM ( Table[aAHT] ),
    BLANK ()
)
&lt;/PRE&gt;
&lt;P&gt;or if you want to aggregate by sum&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Current =
SWITCH (
    SELECTEDVALUE ( Slicer[NCO-AHT] ),
    "NCO", SUM ( Table[aNCO] ) + SUM ( Table[bNCO] ) + SUM ( Table[lyNCO] ),
    "AHT", SUM ( Table[aAHT] ) + SUM ( Table[bAHT] ) + SUM ( Table[lyAHT] ),
    BLANK ()
)
&lt;/PRE&gt;
&lt;DIV style="border-radius: 1px; border: solid #CCCCCC 1px; background: #fafafa url('https://community.powerbi.com/t5/image/serverpage/image-id/86505i901712D27DD154D7/image-size/small?v...') no-repeat right 10px center; background-size: auto 60%;"&gt;Did I answer your question? &lt;STRONG style="margin-right: 100px;"&gt; Mark my post as a solution!&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;P&gt;Proud to be a Datanaut!&lt;/P&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jul 2019 00:42:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SWITCH/m-p/750842#M2733</guid>
      <dc:creator>Stachu</dc:creator>
      <dc:date>2019-07-29T00:42:09Z</dc:date>
    </item>
    <item>
      <title>Re: SWITCH</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SWITCH/m-p/751204#M2751</link>
      <description>&lt;P&gt;Thanks Stachu. I am new to power bi. Yes i wanted to show them seperately(and add more later on). below will clear this more. I have created slicer called Measure which is a seperate table (KPI) and is not lined. I wanted to select NCO and it will show all NOC (aNOC,bNCO,LeNCO,LyNCO) from workforceKPI_YOY table.&amp;nbsp;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jul 2019 08:51:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SWITCH/m-p/751204#M2751</guid>
      <dc:creator>PuneetSoni</dc:creator>
      <dc:date>2019-07-29T08:51:24Z</dc:date>
    </item>
    <item>
      <title>Re: SWITCH</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SWITCH/m-p/752035#M2823</link>
      <description>&lt;P&gt;SWITCH itself cannot change the measures in the chart, it's basically a multiple IF&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;you can use a set of measures like below - in this case the measure will stay the same and just show different value:&lt;/P&gt;
&lt;PRE&gt;Current =
SWITCH (
    SELECTEDVALUE ( Slicer[NCO-AHT] ),
    "NCO", SUM ( Table[aNCO] ),
    "AHT", SUM ( Table[aAHT] ),
    BLANK ()
)&lt;/PRE&gt;
&lt;PRE&gt;Budget=
SWITCH (
    SELECTEDVALUE ( Slicer[NCO-AHT] ),
    "NCO", SUM ( Table[bNCO] ),
    "AHT", SUM ( Table[bAHT] ),
    BLANK ()
)&lt;/PRE&gt;
&lt;P&gt;if you want to keep the setup as is then you may try with bookmarks&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/power-bi/desktop-bookmarks" target="_blank"&gt;https://docs.microsoft.com/en-us/power-bi/desktop-bookmarks&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I'm not sure whether they will remember changing the measures, if not you may create overlapping charts, and set actions to hide the non relevant one. So e.g. if you select NCO in the slicer bookmark will hide all non-NCO charts and make visible only the one with NCO set of measures&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jul 2019 01:08:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SWITCH/m-p/752035#M2823</guid>
      <dc:creator>Stachu</dc:creator>
      <dc:date>2019-07-30T01:08:53Z</dc:date>
    </item>
  </channel>
</rss>

