<?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: How to dynamically use different measures at the Grand Total vs. Filtered in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-dynamically-use-different-measures-at-the-Grand-Total-vs/m-p/3023964#M103025</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="499776" data-lia-user-login="swhitney1008" class="lia-mention lia-mention-user"&gt;swhitney1008&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;please try the following&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;manually create a single column table that contains the names of the three measures&amp;nbsp;&lt;/P&gt;
&lt;P&gt;create a measure as follows&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Turnover (Dynamic) % =
SWITCH (
    SELECTEDVALUE ( Measures[MeasureName] ),
    "Turnover % (Division)", [Turnover % (Division)],
    "Turnover % (Total)", [Turnover % (Total)],
    IF (
        ISFILTERED ( 'DeptStructure'[Department Code] ),
        [Turnover % (Division)],
        [Turnover % (Total)]
    )
)&lt;/LI-CODE&gt;
&lt;P&gt;Place Measures[MeasureName] in the columns of the matrix and place the above measure at the values.&lt;/P&gt;</description>
    <pubDate>Mon, 16 Jan 2023 18:47:52 GMT</pubDate>
    <dc:creator>tamerj1</dc:creator>
    <dc:date>2023-01-16T18:47:52Z</dc:date>
    <item>
      <title>How to dynamically use different measures at the Grand Total vs. Filtered</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-dynamically-use-different-measures-at-the-Grand-Total-vs/m-p/3023890#M103013</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two different measures for calculating Turnover because the logic changes if the data is filtered: "Turnover % (Division)" and "Turnover % (Total)"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like to have a third measure that dynamically switches between the two measures depending on if it's evaluating at the Grand Total. The below screenshot is showing a Matrix but I'd also be using this where it's controlled via a slicer (where no selection is made in the slicer = Grand Total).&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've previously been able to switch between measures dynamically using IF(ISFILTERED(...) but that isn't helping here, likely because I need the Grand Total to work in the absence of any filter selection.&lt;BR /&gt;&lt;BR /&gt;My current (not working) measure is below:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;EM&gt;Turnover (Dynamic) % = &lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; //Department or Division&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; IF(&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ISFILTERED('DeptStructure'[Department Code]) || &lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ISFILTERED('DeptStructure'[Division Code]))&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,[Turnover % (Division)] ,&lt;/EM&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; //Hierarchy&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; IF(&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ISFILTERED(DeptStructure[Division Code])&amp;amp;ISFILTERED(DeptStructure[Department Code])&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , [Turnover % (Division)] ,&lt;/EM&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; //Else&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; [Turnover % (Total)]&lt;/EM&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; ))&lt;/EM&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is greatly appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jan 2023 18:06:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-dynamically-use-different-measures-at-the-Grand-Total-vs/m-p/3023890#M103013</guid>
      <dc:creator>swhitney1008</dc:creator>
      <dc:date>2023-01-16T18:06:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically use different measures at the Grand Total vs. Filtered</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-dynamically-use-different-measures-at-the-Grand-Total-vs/m-p/3023964#M103025</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="499776" data-lia-user-login="swhitney1008" class="lia-mention lia-mention-user"&gt;swhitney1008&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;please try the following&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;manually create a single column table that contains the names of the three measures&amp;nbsp;&lt;/P&gt;
&lt;P&gt;create a measure as follows&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Turnover (Dynamic) % =
SWITCH (
    SELECTEDVALUE ( Measures[MeasureName] ),
    "Turnover % (Division)", [Turnover % (Division)],
    "Turnover % (Total)", [Turnover % (Total)],
    IF (
        ISFILTERED ( 'DeptStructure'[Department Code] ),
        [Turnover % (Division)],
        [Turnover % (Total)]
    )
)&lt;/LI-CODE&gt;
&lt;P&gt;Place Measures[MeasureName] in the columns of the matrix and place the above measure at the values.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jan 2023 18:47:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-dynamically-use-different-measures-at-the-Grand-Total-vs/m-p/3023964#M103025</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-01-16T18:47:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically use different measures at the Grand Total vs. Filtered</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-dynamically-use-different-measures-at-the-Grand-Total-vs/m-p/3024051#M103034</link>
      <description>&lt;P&gt;I think that did the trick!&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm happy to know I was somewhat close with how I was approaching it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks so much!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jan 2023 20:00:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-dynamically-use-different-measures-at-the-Grand-Total-vs/m-p/3024051#M103034</guid>
      <dc:creator>swhitney1008</dc:creator>
      <dc:date>2023-01-16T20:00:24Z</dc:date>
    </item>
  </channel>
</rss>

