<?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: URGENT!! Removing filter context from a measure in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/URGENT-Removing-filter-context-from-a-measure/m-p/3756235#M146548</link>
    <description>&lt;P&gt;Do not include&amp;nbsp; anything not related to the issue or question.&amp;nbsp; Your sample file is way too big.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 11 Mar 2024 20:37:48 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2024-03-11T20:37:48Z</dc:date>
    <item>
      <title>URGENT!! Removing filter context from a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/URGENT-Removing-filter-context-from-a-measure/m-p/3752452#M146376</link>
      <description>&lt;P&gt;Hello Power BI community!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;can you modify this dax code such that even if 'df_Search Order (First)'[Search Order (First)] column is filtered I should always get a total count for Search Order in TotalSum_Category_Occasion_SingleSelect measure? It shouldn't become equal to the&amp;nbsp;DistinctCount_Category_Occasions_SingleSelect measure when I filter the table for a search order...&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;TotalSum_Category_Occasion_SingleSelect measure:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;TotalSum_Category_Occasion_SingleSelect = VAR BrandsSelection = ISFILTERED('df_brands'[Brands])
VAR TotalCount =
IF (
    BrandsSelection, 
CALCULATE(
    SUMX(
        VALUES('Respondent'[Unique_ID]), 
        [TotalDistinctCount_Category_Occasions_SingleSelect]
    ), 'df_brands'[value] = "Yes", 
    ALLSELECTED('Respondent')
), CALCULATE(
    SUMX(
        VALUES('Respondent'[Unique_ID]), 
        [TotalDistinctCount_Category_Occasions_SingleSelect]
    ), 'df_Brands'[value] IN {"Yes", "No", "", "Null"},  
    ALLSELECTED('Respondent')
))
RETURN TotalCount&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DistinctCount_Category_Occasions_SingleSelect measure:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;DistinctCount_Category_Occasions_SingleSelect = 
VAR BrandsSelection = ISFILTERED('df_brands'[Brands])
VAR TotalCount =
IF (
    BrandsSelection, 
    CALCULATE(
    DISTINCTCOUNT('Respondent'[Unique_ID]),
    'df_Occasions'[value1] = "Yes",
    'df_Category Purchased'[value] = "Yes", 'df_brands'[value] = "Yes", 
    FILTER(
        'Respondent',
        'Respondent'[Gender_blended] = SELECTEDVALUE(Respondent[Gender_blended]) ||
        'Respondent'[country] = SELECTEDVALUE(Respondent[country]) ||
        'Respondent'[age_group] = SELECTEDVALUE(Respondent[age_group]) ||
        RELATED('df_Brand Planning'[Brand_Planning]) = SELECTEDVALUE('df_Brand Planning'[Brand_Planning]) ||
        RELATED('df_Category Planning'[Category_Planning]) = SELECTEDVALUE('df_Category Planning'[Category_Planning]) ||
        RELATED('df_Search Order (First)'[Search Order (First)]) = SELECTEDVALUE('df_Search Order (First)'[Search Order (First)]) ||
        RELATED('df_Shopping Mission (Combined)'[Shopping_Mission_Combined]) = SELECTEDVALUE('df_Shopping Mission (Combined)'[Shopping_Mission_Combined])
    )), CALCULATE(
    DISTINCTCOUNT('Respondent'[Unique_ID]),
    'df_Occasions'[value1] = "Yes",
    'df_Category Purchased'[value] = "Yes", 'df_Brands'[value] IN {"Yes", "No", "", "Null"}, 
    FILTER(
        'Respondent',
        'Respondent'[Gender_blended] = SELECTEDVALUE(Respondent[Gender_blended]) ||
        'Respondent'[country] = SELECTEDVALUE(Respondent[country]) ||
        'Respondent'[age_group] = SELECTEDVALUE(Respondent[age_group]) ||
        RELATED('df_Brand Planning'[Brand_Planning]) = SELECTEDVALUE('df_Brand Planning'[Brand_Planning]) ||
        RELATED('df_Category Planning'[Category_Planning]) = SELECTEDVALUE('df_Category Planning'[Category_Planning]) ||
        RELATED('df_Search Order (First)'[Search Order (First)]) = SELECTEDVALUE('df_Search Order (First)'[Search Order (First)]) ||
        RELATED('df_Shopping Mission (Combined)'[Shopping_Mission_Combined]) = SELECTEDVALUE('df_Shopping Mission (Combined)'[Shopping_Mission_Combined])
    )))
RETURN TotalCount&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;As you see below the % calculated by dividing this two measures which equals 100% if I filter any search order..&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Category_Occasion_SingleSelect% = 
    [DistinctCount_Category_Occasions_SingleSelect]/
        [TotalSum_Category_Occasion_SingleSelect]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is happening right now:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Expected Output:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/14361" target="_blank" rel="noopener"&gt;@MFelix&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;,&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/148838" target="_blank" rel="noopener"&gt;@amitchandak&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;,&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/19851" target="_blank" rel="noopener"&gt;@Ashish_Mathur&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 09 Mar 2024 07:40:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/URGENT-Removing-filter-context-from-a-measure/m-p/3752452#M146376</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-03-09T07:40:01Z</dc:date>
    </item>
    <item>
      <title>Re: URGENT!! Removing filter context from a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/URGENT-Removing-filter-context-from-a-measure/m-p/3752754#M146396</link>
      <description>&lt;P&gt;This here is a forum where users help users, time permitting.&amp;nbsp; For urgent requests contact a Microsoft partner near you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please provide sample data that covers your issue or question &lt;STRONG&gt;completely&lt;/STRONG&gt;, in a &lt;STRONG&gt;usable&lt;/STRONG&gt; format (not as a screenshot).&lt;BR /&gt;&lt;BR /&gt;Do not include sensitive information or anything not related to the issue or question. &lt;BR /&gt;&lt;BR /&gt;If you are unsure how to upload data please refer to &lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;Please show the expected outcome based on the sample data you provided. &lt;BR /&gt;&lt;BR /&gt;Want faster answers? &lt;A href="https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 09 Mar 2024 15:52:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/URGENT-Removing-filter-context-from-a-measure/m-p/3752754#M146396</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-03-09T15:52:49Z</dc:date>
    </item>
    <item>
      <title>Re: URGENT!! Removing filter context from a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/URGENT-Removing-filter-context-from-a-measure/m-p/3754173#M146465</link>
      <description>&lt;P&gt;hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Here is the sample pbix:&amp;nbsp;&lt;A href="https://drive.google.com/file/d/11FppQjqX3oQEEcPuwStBxAYBdY66i-R-/view?usp=sharing" target="_self"&gt;https://drive.google.com/file/d/11FppQjqX3oQEEcPuwStBxAYBdY66i-R-/view?usp=sharing&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Please take a look and share any solution you might have.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2024 06:57:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/URGENT-Removing-filter-context-from-a-measure/m-p/3754173#M146465</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-03-11T06:57:14Z</dc:date>
    </item>
    <item>
      <title>Re: URGENT!! Removing filter context from a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/URGENT-Removing-filter-context-from-a-measure/m-p/3756235#M146548</link>
      <description>&lt;P&gt;Do not include&amp;nbsp; anything not related to the issue or question.&amp;nbsp; Your sample file is way too big.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2024 20:37:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/URGENT-Removing-filter-context-from-a-measure/m-p/3756235#M146548</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-03-11T20:37:48Z</dc:date>
    </item>
    <item>
      <title>Re: URGENT!! Removing filter context from a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/URGENT-Removing-filter-context-from-a-measure/m-p/3756863#M146568</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;&amp;nbsp;The dataset itself is huge and has many connections. Can you please take a look at the issue?&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2024 04:30:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/URGENT-Removing-filter-context-from-a-measure/m-p/3756863#M146568</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-03-12T04:30:57Z</dc:date>
    </item>
    <item>
      <title>Re: URGENT!! Removing filter context from a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/URGENT-Removing-filter-context-from-a-measure/m-p/3757806#M146608</link>
      <description>&lt;P&gt;I can only assist if you can provide sample data that covers the issue without unrelated items.&amp;nbsp;I hope someone else can help you further.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2024 11:36:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/URGENT-Removing-filter-context-from-a-measure/m-p/3757806#M146608</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-03-12T11:36:13Z</dc:date>
    </item>
  </channel>
</rss>

