<?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: Implement data masking within matrix visual using DAX expressions in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Implement-data-masking-within-matrix-visual-using-DAX/m-p/4659913#M178436</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1256917" data-lia-user-login="smasl94" class="lia-mention lia-mention-user"&gt;smasl94&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;SPAN data-teams="true"&gt;Just wanted to check if you had the opportunity to review the suggestions provided?&lt;BR /&gt;If the response has addressed your query, please&amp;nbsp;&lt;STRONG&gt;accept it as a solution&lt;/STRONG&gt;&amp;nbsp;and give a&amp;nbsp;&lt;STRONG&gt;'Kudos'&lt;/STRONG&gt;&amp;nbsp;so other members can easily find it.&lt;BR /&gt;Thank You&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 20 Apr 2025 12:04:25 GMT</pubDate>
    <dc:creator>v-sdhruv</dc:creator>
    <dc:date>2025-04-20T12:04:25Z</dc:date>
    <item>
      <title>Implement data masking within matrix visual using DAX expressions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Implement-data-masking-within-matrix-visual-using-DAX/m-p/4646422#M177849</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am currently building a report and I would like to mask all leaf (i.e., age_group) values for a specific combination of association_id and gender if any of the leaf values is between 1 and 4 (but none of the column/row totals should be masked whatsoever).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the first picture, you can see how the data looks like from the beginning.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have constructed a DAX expression that looks like this:&lt;BR /&gt;&lt;BR /&gt;```dax&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;num_members_masked_display =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;MemberCount&lt;/SPAN&gt;&lt;SPAN&gt; =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'gold fact_member_count_monthly'&lt;/SPAN&gt;&lt;SPAN&gt;[num_members]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;-- Check if this is a grand total row (no association in scope)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;IsGrandTotal&lt;/SPAN&gt;&lt;SPAN&gt; =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;NOT&lt;/SPAN&gt; &lt;SPAN&gt;HASONEVALUE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'gold fact_member_count_monthly'&lt;/SPAN&gt;&lt;SPAN&gt;[association_id]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;-- Check if this is a total column (no age group in scope)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;IsTotalColumn&lt;/SPAN&gt;&lt;SPAN&gt; =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;NOT&lt;/SPAN&gt; &lt;SPAN&gt;ISINSCOPE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'gold fact_member_count_monthly'&lt;/SPAN&gt;&lt;SPAN&gt;[age_group]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;-- Get current association and gender&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;CurrentAssociation&lt;/SPAN&gt;&lt;SPAN&gt; =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'gold fact_member_count_monthly'&lt;/SPAN&gt;&lt;SPAN&gt;[association_id]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;CurrentGender&lt;/SPAN&gt;&lt;SPAN&gt; =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'gold fact_member_count_monthly'&lt;/SPAN&gt;&lt;SPAN&gt;[gender]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;-- Should mask for this association + gender if ANY age group value is 1–4&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;ShouldBeMaskedForAssociationGender&lt;/SPAN&gt;&lt;SPAN&gt; =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;COUNTROWS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;'gold fact_member_count_monthly'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;VALUE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'gold fact_member_count_monthly'&lt;/SPAN&gt;&lt;SPAN&gt;[num_members]&lt;/SPAN&gt;&lt;SPAN&gt;) &amp;gt;= &lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt; &amp;amp;&amp;amp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;VALUE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'gold fact_member_count_monthly'&lt;/SPAN&gt;&lt;SPAN&gt;[num_members]&lt;/SPAN&gt;&lt;SPAN&gt;) &amp;lt;= &lt;/SPAN&gt;&lt;SPAN&gt;4&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;REMOVEFILTERS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'gold fact_member_count_monthly'&lt;/SPAN&gt;&lt;SPAN&gt;[age_group]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;KEEPFILTERS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'gold fact_member_count_monthly'&lt;/SPAN&gt;&lt;SPAN&gt;[association_id]&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;CurrentAssociation&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;KEEPFILTERS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'gold fact_member_count_monthly'&lt;/SPAN&gt;&lt;SPAN&gt;[gender]&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;CurrentGender&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; ) &amp;gt; &lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;IsGrandTotal&lt;/SPAN&gt;&lt;SPAN&gt; || &lt;/SPAN&gt;&lt;SPAN&gt;IsTotalColumn&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;MemberCount&lt;/SPAN&gt;&lt;SPAN&gt;, &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;-- Show totals&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;ShouldBeMaskedForAssociationGender&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"**"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;MemberCount&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;```&lt;BR /&gt;&lt;BR /&gt;Using the above DAX expression in a measurement and use that measurement instead of raw numbers seemed at first glance to work completely fine until I detected that there values that should not be masked but still get masked. It currently looks like this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;On the first row, you can see that the association with id "5C48E206-E97B-EF11-AC20-7C1E5220324F" gets all its leaf values for "Kvinna" masked which is correct as there is one leaf value for "Kvinna" that is in fact between 1 and 4, but when I look at "Man", then there is no value that is between 1 and 4 and yet all of them get masked. It works completely fine when there are leaf values between 1 and 4. However, for some rows, it seems to apply masking where it is not needed.&lt;BR /&gt;&lt;BR /&gt;I sense that something very basic is missing in my DAX expression, but I have just not figured it out. Am I on a correct path with using measurements like this? Are there other alternatives that I may need to consider? Ideally, I would like to finish the DAX expression, but I am willing to listen to other approaches as I am not an experienced Power BI user.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for helping out in advance!&lt;/P&gt;</description>
      <pubDate>Thu, 10 Apr 2025 08:58:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Implement-data-masking-within-matrix-visual-using-DAX/m-p/4646422#M177849</guid>
      <dc:creator>smasl94</dc:creator>
      <dc:date>2025-04-10T08:58:01Z</dc:date>
    </item>
    <item>
      <title>Re: Implement data masking within matrix visual using DAX expressions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Implement-data-masking-within-matrix-visual-using-DAX/m-p/4646434#M177851</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1256917" data-lia-user-login="smasl94" class="lia-mention lia-mention-user"&gt;smasl94&lt;/a&gt;&amp;nbsp;, Try using&lt;/P&gt;
&lt;P&gt;dax&lt;BR /&gt;num_members_masked_display =&lt;BR /&gt;VAR MemberCount =&lt;BR /&gt;SUM('gold fact_member_count_monthly_sylwester'[num_members])&lt;/P&gt;
&lt;P&gt;-- Check if this is a grand total row (no association in scope)&lt;BR /&gt;VAR IsGrandTotal =&lt;BR /&gt;NOT HASONEVALUE('gold fact_member_count_monthly_sylwester'[association_id])&lt;/P&gt;
&lt;P&gt;-- Check if this is a total column (no age group in scope)&lt;BR /&gt;VAR IsTotalColumn =&lt;BR /&gt;NOT ISINSCOPE('gold fact_member_count_monthly_sylwester'[age_group])&lt;/P&gt;
&lt;P&gt;-- Get current association and gender&lt;BR /&gt;VAR CurrentAssociation =&lt;BR /&gt;SELECTEDVALUE('gold fact_member_count_monthly_sylwester'[association_id])&lt;BR /&gt;VAR CurrentGender =&lt;BR /&gt;SELECTEDVALUE('gold fact_member_count_monthly_sylwester'[gender])&lt;/P&gt;
&lt;P&gt;-- Should mask for this association + gender if ANY age group value is 1–4&lt;BR /&gt;VAR ShouldBeMaskedForAssociationGender =&lt;BR /&gt;CALCULATE(&lt;BR /&gt;COUNTROWS(&lt;BR /&gt;FILTER(&lt;BR /&gt;'gold fact_member_count_monthly_sylwester',&lt;BR /&gt;'gold fact_member_count_monthly_sylwester'[num_members] &amp;gt;= 1 &amp;amp;&amp;amp;&lt;BR /&gt;'gold fact_member_count_monthly_sylwester'[num_members] &amp;lt;= 4 &amp;amp;&amp;amp;&lt;BR /&gt;'gold fact_member_count_monthly_sylwester'[association_id] = CurrentAssociation &amp;amp;&amp;amp;&lt;BR /&gt;'gold fact_member_count_monthly_sylwester'[gender] = CurrentGender&lt;BR /&gt;)&lt;BR /&gt;),&lt;BR /&gt;REMOVEFILTERS('gold fact_member_count_monthly_sylwester'[age_group])&lt;BR /&gt;) &amp;gt; 0&lt;/P&gt;
&lt;P&gt;RETURN&lt;BR /&gt;IF(&lt;BR /&gt;IsGrandTotal || IsTotalColumn,&lt;BR /&gt;MemberCount, -- Show totals&lt;BR /&gt;IF(&lt;BR /&gt;ShouldBeMaskedForAssociationGender,&lt;BR /&gt;"**",&lt;BR /&gt;MemberCount&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Thu, 10 Apr 2025 08:57:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Implement-data-masking-within-matrix-visual-using-DAX/m-p/4646434#M177851</guid>
      <dc:creator>bhanu_gautam</dc:creator>
      <dc:date>2025-04-10T08:57:33Z</dc:date>
    </item>
    <item>
      <title>Re: Implement data masking within matrix visual using DAX expressions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Implement-data-masking-within-matrix-visual-using-DAX/m-p/4646447#M177852</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="625922" data-lia-user-login="bhanu_gautam" class="lia-mention lia-mention-user"&gt;bhanu_gautam&lt;/a&gt;!&lt;BR /&gt;&lt;BR /&gt;Thank you very much for your suggestion!&lt;BR /&gt;&lt;BR /&gt;I used that suggested DAX expression, but unfortunately, it seems like it persists. It is the same issue for e.g. the first row as mentioned originally in my post.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Apr 2025 09:01:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Implement-data-masking-within-matrix-visual-using-DAX/m-p/4646447#M177852</guid>
      <dc:creator>smasl94</dc:creator>
      <dc:date>2025-04-10T09:01:39Z</dc:date>
    </item>
    <item>
      <title>Re: Implement data masking within matrix visual using DAX expressions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Implement-data-masking-within-matrix-visual-using-DAX/m-p/4648725#M177949</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1256917" data-lia-user-login="smasl94" class="lia-mention lia-mention-user"&gt;smasl94&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;You can try modifying&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;VAR ShouldBeMaskedForAssociationGender&amp;nbsp; with&lt;BR /&gt;VAR ShouldBeMaskedForAssociationGender=&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;FILTER(&lt;BR /&gt;ALL('gold fact_member_count_monthly'),&lt;BR /&gt;'gold fact_member_count_monthly'[association_id] = CurrentAssociation &amp;amp;&amp;amp;&lt;BR /&gt;'gold fact_member_count_monthly'[gender] = CurrentGender&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;VAR MaskCondition =&lt;BR /&gt;COUNTROWS(&lt;BR /&gt;FILTER(&lt;BR /&gt;MemberSubset,&lt;BR /&gt;VALUE('gold fact_member_count_monthly'[num_members]) &amp;gt;= 1 &amp;amp;&amp;amp;&lt;BR /&gt;VALUE('gold fact_member_count_monthly'[num_members]) &amp;lt;= 4&lt;BR /&gt;)&lt;BR /&gt;) &amp;gt; 0&lt;/P&gt;
&lt;P&gt;RETURN&lt;BR /&gt;IF(&lt;BR /&gt;IsGrandTotal || IsTotalColumn,&lt;BR /&gt;MemberCount,&lt;BR /&gt;IF(&lt;BR /&gt;MaskCondition,&lt;BR /&gt;"**",&lt;BR /&gt;MemberCount&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;Additionallly,to further validate the measure, try to return rows with the given condition and check the root cause if this is actually returing the desired values with the correct gender.&lt;BR /&gt;Use:&lt;BR /&gt;RETURN&lt;BR /&gt;COUNTROWS(&lt;BR /&gt;FILTER(&lt;BR /&gt;&lt;SPAN&gt;VAR ShouldBeMaskedForAssociationGender&lt;/SPAN&gt;,&lt;BR /&gt;VALUE('gold fact_member_count_monthly'[num_members]) &amp;gt;= 1 &amp;amp;&amp;amp;&lt;BR /&gt;VALUE('gold fact_member_count_monthly'[num_members]) &amp;lt;= 4&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;Hope this helps!&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Apr 2025 12:37:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Implement-data-masking-within-matrix-visual-using-DAX/m-p/4648725#M177949</guid>
      <dc:creator>v-sdhruv</dc:creator>
      <dc:date>2025-04-11T12:37:23Z</dc:date>
    </item>
    <item>
      <title>Re: Implement data masking within matrix visual using DAX expressions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Implement-data-masking-within-matrix-visual-using-DAX/m-p/4659913#M178436</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1256917" data-lia-user-login="smasl94" class="lia-mention lia-mention-user"&gt;smasl94&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;SPAN data-teams="true"&gt;Just wanted to check if you had the opportunity to review the suggestions provided?&lt;BR /&gt;If the response has addressed your query, please&amp;nbsp;&lt;STRONG&gt;accept it as a solution&lt;/STRONG&gt;&amp;nbsp;and give a&amp;nbsp;&lt;STRONG&gt;'Kudos'&lt;/STRONG&gt;&amp;nbsp;so other members can easily find it.&lt;BR /&gt;Thank You&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 20 Apr 2025 12:04:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Implement-data-masking-within-matrix-visual-using-DAX/m-p/4659913#M178436</guid>
      <dc:creator>v-sdhruv</dc:creator>
      <dc:date>2025-04-20T12:04:25Z</dc:date>
    </item>
    <item>
      <title>Re: Implement data masking within matrix visual using DAX expressions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Implement-data-masking-within-matrix-visual-using-DAX/m-p/4665647#M178687</link>
      <description>&lt;P&gt;Hi, all!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks to all of you for providing solutions!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It turned out that there were some rows in the Azure SQL database table that contained null values for the age_group field, which messed up with the calculations. Therefore, I used&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="625922" data-lia-user-login="bhanu_gautam" class="lia-mention lia-mention-user"&gt;bhanu_gautam&lt;/a&gt;'s suggestion and then added the condition `&lt;SPAN&gt;NOT&lt;/SPAN&gt; &lt;SPAN&gt;ISBLANK&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'gold fact_member_count_monthly_sylwester'&lt;/SPAN&gt;&lt;SPAN&gt;[age_group]&lt;/SPAN&gt;&lt;SPAN&gt;)` within the FILTER function to exclude such rows from being accounted in the calculations, then it worked like a charm.&lt;BR /&gt;&lt;BR /&gt;Once again, thank you for helping me out with this one!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Apr 2025 21:45:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Implement-data-masking-within-matrix-visual-using-DAX/m-p/4665647#M178687</guid>
      <dc:creator>smasl94</dc:creator>
      <dc:date>2025-04-23T21:45:19Z</dc:date>
    </item>
  </channel>
</rss>

