<?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: Create a Measure Using Two Other Measures but One Ignores a Filter in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-Measure-Using-Two-Other-Measures-but-One-Ignores-a/m-p/4002494#M156053</link>
    <description>&lt;P&gt;This was great, thank you for the help!&lt;/P&gt;</description>
    <pubDate>Thu, 20 Jun 2024 16:29:51 GMT</pubDate>
    <dc:creator>ngoodweiler</dc:creator>
    <dc:date>2024-06-20T16:29:51Z</dc:date>
    <item>
      <title>Create a Measure Using Two Other Measures but One Ignores a Filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-Measure-Using-Two-Other-Measures-but-One-Ignores-a/m-p/3998462#M155612</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;I have a table with numerous, but simple measures and different categorization columns. The two measures I need to use are for number of certificates and number of denials. Both are using similar count functions, CALCULATE(COUNT('Table'[ID]),FILTER('Table','Table'[Qualifier]="Cert")) and&amp;nbsp;CALCULATE(COUNT('Table'[ID]),FILTER('Table','Table'[Qualifier]="Denial")). My problem is that I need to find the Cert Rate, Certs/(Certs + Denials), in a matrix that has the Year/Quarter and U.S. State as rows and Cert Category in the column, however the Cert Rate must be calculated using the total Certs + Denials across each row (so the total for each state, year, and quarter).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem I have is two-fold. The first is that I need it to calculate the Cert Rate across the entire column, as in the total of (Certs + Denials) must ignore the Cert Category, and second is that the Denials records do not have a Cert Category associated with them (the value for Cert Category is blank whereas for Certs records, there is always a value). They are all in one large table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried looking at different topics, but couldn't find one that has the same issue.&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;The data table is similar to this:&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;TL:DR&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I have these two matrixes and need to get the third one calculated from Certs/(Certs+Denials) across the rows&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 18 Jun 2024 14:36:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-Measure-Using-Two-Other-Measures-but-One-Ignores-a/m-p/3998462#M155612</guid>
      <dc:creator>ngoodweiler</dc:creator>
      <dc:date>2024-06-18T14:36:37Z</dc:date>
    </item>
    <item>
      <title>Re: Create a Measure Using Two Other Measures but One Ignores a Filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-Measure-Using-Two-Other-Measures-but-One-Ignores-a/m-p/3999309#M155718</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="761562" data-lia-user-login="ngoodweiler" class="lia-mention lia-mention-user"&gt;ngoodweiler&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Based on your description, and the data you provided, I tried to create two matrices like yours using the following sample data:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;I created a measure using the following DAX expression:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;MEASURE =
VAR _table =
    SUMMARIZE (
        ALLSELECTED ( 'Table' ),
        'Table'[State],
        'Table'[Date],
        "Year", YEAR ( 'Table'[Date] ),
        "Denis Total",
            CALCULATE (
                SUM ( 'Table'[value] ),
                FILTER ( 'Table', 'Table'[Qualifier] = "Denial" )
            )
    )
VAR _table1 =
    SUMMARIZE (
        _table,
        'Table'[State],
        [Year],
        "Denis",
            VAR _current_year = [Year]
            VAR _state = 'Table'[State]
            RETURN
                SUMX (
                    FILTER ( _table, 'Table'[State] = _state &amp;amp;&amp;amp; [Year] = _current_year ),
                    [Denis Total]
                )
    )
VAR _table2 =
    FILTER (
        SUMMARIZE (
            ALLSELECTED ( 'Table' ),
            'Table'[State],
            'Table'[Category],
            'Table'[Date],
            "Year", YEAR ( 'Table'[Date] ),
            "value", CALCULATE ( SUM ( 'Table'[value] ) )
        ),
        'Table'[Category] &amp;lt;&amp;gt; BLANK ()
    )
VAR _table3 =
    SUMMARIZE (
        _table2,
        'Table'[State],
        'Table'[Category],
        [Year],
        "value1",
            VAR _current_year = [Year]
            VAR _state = 'Table'[State]
            VAR _category = 'Table'[Category]
            RETURN
                SUMX (
                    FILTER (
                        _table2,
                        'Table'[Category] = _category
                            &amp;amp;&amp;amp; 'Table'[State] = _state
                            &amp;amp;&amp;amp; [Year] = _current_year
                    ),
                    [value]
                )
    )
VAR _current_state =
    SELECTEDVALUE ( 'Table'[State] )
VAR _current_year =
    SELECTEDVALUE ( 'Table'[Date].[Year] )
VAR _current_category =
    SELECTEDVALUE ( 'Table'[Category] )
VAR _table4 =
    FILTER ( _table1, 'Table'[State] = _current_state &amp;amp;&amp;amp; [Year] = _current_year )
VAR _table5 =
    FILTER (
        _table3,
        'Table'[State] = _current_state
            &amp;amp;&amp;amp; 'Table'[Category] = _current_category
            &amp;amp;&amp;amp; [Year] = _current_year
    )
VAR _dens =
    CALCULATE ( MAXX ( _table4, [Denis] ) )
RETURN
    DIVIDE (
        MAXX ( _table5, [value1] ),
        _dens
            + SUMX (
                FILTER ( _table3, 'Table'[State] = _current_state &amp;amp;&amp;amp; [Year] = _current_year ),
                [value1]
            )
    )
&lt;/LI-CODE&gt;
&lt;P&gt;Put this measure in the matrix and the result is as follows:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;I've provided the PBIX file used this time below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcommunity.powerbi.com%2Ft5%2FCommunity-Blog%2FHow-to-Get-Your-Question-Answered-Quickly%2Fba-p%2F38490&amp;amp;data=05%7C02%7Cv-jianpengli%40microsoft.com%7Cd9552f18a0c94a7564f308dc188bf35e%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638412236574903368%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;amp;sdata=3jxUE%2BTNC8dS4DIhPphEB3NA%2BK94pwURGHu%2BXC4eezw%3D&amp;amp;reserved=0" target="_blank"&gt;How to Get Your Question Answered Quickly&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;
&lt;P&gt;Jianpeng Li&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2024 03:39:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-Measure-Using-Two-Other-Measures-but-One-Ignores-a/m-p/3999309#M155718</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-06-19T03:39:55Z</dc:date>
    </item>
    <item>
      <title>Re: Create a Measure Using Two Other Measures but One Ignores a Filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-Measure-Using-Two-Other-Measures-but-One-Ignores-a/m-p/4002494#M156053</link>
      <description>&lt;P&gt;This was great, thank you for the help!&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2024 16:29:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-Measure-Using-Two-Other-Measures-but-One-Ignores-a/m-p/4002494#M156053</guid>
      <dc:creator>ngoodweiler</dc:creator>
      <dc:date>2024-06-20T16:29:51Z</dc:date>
    </item>
  </channel>
</rss>

