<?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: I need help figuring out which ALL() filter logic will produce the results I need in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-help-figuring-out-which-ALL-filter-logic-will-produce-the/m-p/3660392#M141834</link>
    <description>&lt;P&gt;It looks like you are trying to calculate the Total Volume based on different conditions, and you want to handle the "Network" case differently. To achieve the desired output, you need to adjust the context transition in your DAX formula.&lt;/P&gt;&lt;P&gt;You can use the following modified measure to achieve the desired output:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Total Volume =&lt;BR /&gt;VAR __SelectedCampus = SELECTEDVALUE(dim_campus[name])&lt;/P&gt;&lt;P&gt;RETURN&lt;BR /&gt;IF (&lt;BR /&gt;__SelectedCampus = "Network",&lt;BR /&gt;CALCULATE (&lt;BR /&gt;SUM ( v_campus_volume[volume] ),&lt;BR /&gt;ALL ( dim_campus[name] ),&lt;BR /&gt;VALUES ( dim_campus[sort_order] )&lt;BR /&gt;),&lt;BR /&gt;CALCULATE ( SUM ( v_campus_volume[volume] ) )&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Explanation:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;For the "Network" case, you use CALCULATE with ALL ( dim_campus[name] ) to remove the filter context on the campus name. Additionally, you use VALUES ( dim_campus[sort_order] ) to maintain the sort order in the result.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;For other campuses, you simply calculate the sum of the volume without altering the filter context.&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;This should give you the desired output where the "Network" rows show the sum across all campuses and years.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If this post&amp;nbsp;helps, then please consider&amp;nbsp;Accepting it as the solution&amp;nbsp;to help the other members find it more quickly.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;In case there is still a problem, please feel free and explain your issue in detail,&amp;nbsp;It will be my pleasure to assist you in any way I can.&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 25 Jan 2024 12:33:06 GMT</pubDate>
    <dc:creator>123abc</dc:creator>
    <dc:date>2024-01-25T12:33:06Z</dc:date>
    <item>
      <title>I need help figuring out which ALL() filter logic will produce the results I need</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-help-figuring-out-which-ALL-filter-logic-will-produce-the/m-p/3660349#M141827</link>
      <description>&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;Source Table&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;v_campus_volume[name]&lt;/TD&gt;&lt;TD&gt;v_campus_volume[fiscal_year]&lt;/TD&gt;&lt;TD&gt;v_campus_volume[volume]&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Campus 1&lt;/TD&gt;&lt;TD&gt;2021&lt;/TD&gt;&lt;TD&gt;743&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Campus 2&lt;/TD&gt;&lt;TD&gt;2021&lt;/TD&gt;&lt;TD&gt;573&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Campus 3&lt;/TD&gt;&lt;TD&gt;2021&lt;/T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t;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Campus 3&lt;/TD&gt;&lt;TD&gt;2022&lt;/TD&gt;&lt;TD&gt;288&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Campus 4&lt;/TD&gt;&lt;TD&gt;2021&lt;/TD&gt;&lt;TD&gt;545&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Campus 4&lt;/TD&gt;&lt;TD&gt;2022&lt;/TD&gt;&lt;TD&gt;516&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Network&lt;/TD&gt;&lt;TD&gt;2021&lt;/TD&gt;&lt;TD&gt;2316&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Network&lt;/TD&gt;&lt;TD&gt;2022&lt;/TD&gt;&lt;TD&gt;1924&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Campus 1&lt;/TD&gt;&lt;TD&gt;2021&lt;/TD&gt;&lt;TD&gt;743&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Campus 1&lt;/TD&gt;&lt;TD&gt;2022&lt;/TD&gt;&lt;TD&gt;566&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Current measure:&lt;BR /&gt;Total Volume = CALCULATE ( SUM ( v_campus_volume[volume] ) )&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Where I'm at but I can't figure out which ALL combo to use to get it to work right... I've only been able to get a total from the entire dataset to return anything.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Total Volume =&lt;BR /&gt;VAR __SelectedCampus =&lt;BR /&gt;SELECTEDVALUE ( dim_campus[name] )&lt;BR /&gt;RETURN&lt;BR /&gt;IF (&lt;BR /&gt;__SelectedCampus = "Network",&lt;BR /&gt;CALCULATE ( SUM ( v_campus_volume[volume] ), ALL ( dim_campus ) ),&lt;BR /&gt;CALCULATE ( SUM ( v_campus_volume[volume] ) )&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jan 2024 12:21:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-help-figuring-out-which-ALL-filter-logic-will-produce-the/m-p/3660349#M141827</guid>
      <dc:creator>djallarii</dc:creator>
      <dc:date>2024-01-25T12:21:38Z</dc:date>
    </item>
    <item>
      <title>Re: I need help figuring out which ALL() filter logic will produce the results I need</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-help-figuring-out-which-ALL-filter-logic-will-produce-the/m-p/3660392#M141834</link>
      <description>&lt;P&gt;It looks like you are trying to calculate the Total Volume based on different conditions, and you want to handle the "Network" case differently. To achieve the desired output, you need to adjust the context transition in your DAX formula.&lt;/P&gt;&lt;P&gt;You can use the following modified measure to achieve the desired output:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Total Volume =&lt;BR /&gt;VAR __SelectedCampus = SELECTEDVALUE(dim_campus[name])&lt;/P&gt;&lt;P&gt;RETURN&lt;BR /&gt;IF (&lt;BR /&gt;__SelectedCampus = "Network",&lt;BR /&gt;CALCULATE (&lt;BR /&gt;SUM ( v_campus_volume[volume] ),&lt;BR /&gt;ALL ( dim_campus[name] ),&lt;BR /&gt;VALUES ( dim_campus[sort_order] )&lt;BR /&gt;),&lt;BR /&gt;CALCULATE ( SUM ( v_campus_volume[volume] ) )&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Explanation:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;For the "Network" case, you use CALCULATE with ALL ( dim_campus[name] ) to remove the filter context on the campus name. Additionally, you use VALUES ( dim_campus[sort_order] ) to maintain the sort order in the result.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;For other campuses, you simply calculate the sum of the volume without altering the filter context.&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;This should give you the desired output where the "Network" rows show the sum across all campuses and years.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If this post&amp;nbsp;helps, then please consider&amp;nbsp;Accepting it as the solution&amp;nbsp;to help the other members find it more quickly.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;In case there is still a problem, please feel free and explain your issue in detail,&amp;nbsp;It will be my pleasure to assist you in any way I can.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jan 2024 12:33:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-help-figuring-out-which-ALL-filter-logic-will-produce-the/m-p/3660392#M141834</guid>
      <dc:creator>123abc</dc:creator>
      <dc:date>2024-01-25T12:33:06Z</dc:date>
    </item>
    <item>
      <title>Re: I need help figuring out which ALL() filter logic will produce the results I need</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-help-figuring-out-which-ALL-filter-logic-will-produce-the/m-p/3665197#M142071</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="553998" data-lia-user-login="djallarii" class="lia-mention lia-mention-user"&gt;djallarii&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tested your measure and the results are as follows.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or if you are still confused about it, please feel free to let me know.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Neeko Tang&lt;/P&gt;
&lt;P&gt;If this post  &lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider &lt;EM&gt;&lt;STRONG&gt;Accept it as the solution &lt;/STRONG&gt;&lt;/EM&gt; to help the other members find it more quickly.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jan 2024 02:43:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-help-figuring-out-which-ALL-filter-logic-will-produce-the/m-p/3665197#M142071</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-01-29T02:43:52Z</dc:date>
    </item>
  </channel>
</rss>

