<?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 How to aggregate in a measure without actually aggregating? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-aggregate-in-a-measure-without-actually-aggregating/m-p/3987429#M154568</link>
    <description>&lt;P&gt;HI! so I am trying to use the isinscopre function in a matrix to show different transaction count values based on the hierarchy of Event Name -&amp;gt; Offer ID -&amp;gt; SKU. My measure works fine to switch teh values betweek sku and offer, but for osme reason it's showing the total sum of ALL events and not just the associated event. I'm wondering if it's something wrong with my model?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the measure&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;EM&gt;TY Transactions = &lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;VAR sku = SUM('Consolidated SKU Sales'[Total transactions])&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;VAR offer = SUM('Consolidated Offer'[ty trans count])&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;VAR event = SUM('Consolidated Events'[ty trans count])&lt;/EM&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;EM&gt;RETURN&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;IF(&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; ISINSCOPE('Consolidated SKU Sales'[SKU]), &lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; sku, &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; ISINSCOPE('Consolidated SKU Sales'[Offer Name Tx]), &lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; offer, &lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &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; &amp;nbsp; &amp;nbsp; ISINSCOPE('Consolidated SKU Sales'[Event Nm]), &lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; event&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; )&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So from left to right, this is my transactions measure, the count for the event, the count for teh offers for that event (one offer in this example), and the count for differnet sku products.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Looking across the rows, it works fine except for that event, which is showing the sum of total counts for all. The event, sku,and offer tables are connected with unique keys, and there are unique values of the event id, so i'm not sure why this isn't calulating correctly. Is there a way to just not use Sum at all in my measure, and have it display the correct associated count? Thanks!&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 12 Jun 2024 03:31:39 GMT</pubDate>
    <dc:creator>alaynanich</dc:creator>
    <dc:date>2024-06-12T03:31:39Z</dc:date>
    <item>
      <title>How to aggregate in a measure without actually aggregating?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-aggregate-in-a-measure-without-actually-aggregating/m-p/3987429#M154568</link>
      <description>&lt;P&gt;HI! so I am trying to use the isinscopre function in a matrix to show different transaction count values based on the hierarchy of Event Name -&amp;gt; Offer ID -&amp;gt; SKU. My measure works fine to switch teh values betweek sku and offer, but for osme reason it's showing the total sum of ALL events and not just the associated event. I'm wondering if it's something wrong with my model?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the measure&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;EM&gt;TY Transactions = &lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;VAR sku = SUM('Consolidated SKU Sales'[Total transactions])&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;VAR offer = SUM('Consolidated Offer'[ty trans count])&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;VAR event = SUM('Consolidated Events'[ty trans count])&lt;/EM&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;EM&gt;RETURN&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;IF(&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; ISINSCOPE('Consolidated SKU Sales'[SKU]), &lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; sku, &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; ISINSCOPE('Consolidated SKU Sales'[Offer Name Tx]), &lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; offer, &lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &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; &amp;nbsp; &amp;nbsp; ISINSCOPE('Consolidated SKU Sales'[Event Nm]), &lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; event&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; )&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So from left to right, this is my transactions measure, the count for the event, the count for teh offers for that event (one offer in this example), and the count for differnet sku products.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Looking across the rows, it works fine except for that event, which is showing the sum of total counts for all. The event, sku,and offer tables are connected with unique keys, and there are unique values of the event id, so i'm not sure why this isn't calulating correctly. Is there a way to just not use Sum at all in my measure, and have it display the correct associated count? Thanks!&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2024 03:31:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-aggregate-in-a-measure-without-actually-aggregating/m-p/3987429#M154568</guid>
      <dc:creator>alaynanich</dc:creator>
      <dc:date>2024-06-12T03:31:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to aggregate in a measure without actually aggregating?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-aggregate-in-a-measure-without-actually-aggregating/m-p/3989811#M154710</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="659294" data-lia-user-login="alaynanich" class="lia-mention lia-mention-user"&gt;alaynanich&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;After using filter to check the current row contents level, you also need to add correspond filters to these expressions to control calculate the result instead directly use aggregate&amp;nbsp;functions(e.g. sum, average, average) to implicit calculation.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;TY Transactions =
VAR sku =
    CALCULATE (
        SUM ( 'Consolidated SKU Sales'[Total transactions] ),
        ALLSELECTED ( 'Consolidated SKU Sales' ),
        VALUES ( 'Consolidated SKU Sales'[SKU] )
    )
VAR offer =
    CALCULATE (
        SUM ( 'Consolidated Offer'[ty trans count] ),
        ALLSELECTED ( 'Consolidated SKU Sales' ),
        VALUES ( 'Consolidated SKU Sales'[SKU] ),
        VALUES ( 'Consolidated SKU Sales'[Offer Name Tx] )
    )
VAR event =
    CALCULATE (
        SUM ( 'Consolidated Events'[ty trans count] ),
        ALLSELECTED ( 'Consolidated SKU Sales' ),
        VALUES ( 'Consolidated SKU Sales'[SKU] ),
        VALUES ( 'Consolidated SKU Sales'[Offer Name Tx] ),
        VALUES ( 'Consolidated SKU Sales'[Event Nm] )
    )
RETURN
    IF (
        ISINSCOPE ( 'Consolidated SKU Sales'[SKU] ),
        sku,
        IF (
            ISINSCOPE ( 'Consolidated SKU Sales'[Offer Name Tx] ),
            offer,
            IF ( ISINSCOPE ( 'Consolidated SKU Sales'[Event Nm] ), event )
        )
    )&lt;/LI-CODE&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Xiaoxin Sheng&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2024 01:19:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-aggregate-in-a-measure-without-actually-aggregating/m-p/3989811#M154710</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-06-13T01:19:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to aggregate in a measure without actually aggregating?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-aggregate-in-a-measure-without-actually-aggregating/m-p/3993811#M155034</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;thank you!! that worked like a charm!&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jun 2024 17:35:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-aggregate-in-a-measure-without-actually-aggregating/m-p/3993811#M155034</guid>
      <dc:creator>alaynanich</dc:creator>
      <dc:date>2024-06-14T17:35:09Z</dc:date>
    </item>
  </channel>
</rss>

