<?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: Measure in a measure skips row context in report view in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-in-a-measure-skips-row-context-in-report-view/m-p/1315287#M23076</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="179989" data-lia-user-login="saraMissBI" class="lia-mention lia-mention-user"&gt;saraMissBI&lt;/a&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="52518" data-lia-user-login="Fowmy" class="lia-mention lia-mention-user"&gt;Fowmy&lt;/a&gt;&amp;nbsp;. Thanks for your help! I figured it out thanks to your help. The rows that the measure calculated to were no the same rows as the new measure calculated. I ended up making a calculated column in another table to preserve the row context in the new measure.&lt;/P&gt;</description>
    <pubDate>Fri, 21 Aug 2020 15:53:34 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-08-21T15:53:34Z</dc:date>
    <item>
      <title>Measure in a measure skips row context in report view</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-in-a-measure-skips-row-context-in-report-view/m-p/1314856#M23056</link>
      <description>&lt;P&gt;Hi Community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've run into a problem with DAX. Usually I find my answer on this community as millions probably have asked the same question but I can't find it.&lt;/P&gt;&lt;P&gt;Maybe becasue I don't use the right keywords. In any case, I would be very grateful if you could help me.&lt;/P&gt;&lt;P&gt;I'm trying to rebuild a power BI forecast with measures instead of calculated columns as that file became way too big in terms of file size.&lt;/P&gt;&lt;P&gt;I have a dynamic measure (&lt;STRONG&gt;&lt;SPAN&gt;[BL1 Unfunded Old Contracts]&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;)&lt;/SPAN&gt; that currently outputs 0,9339 and I want to use that measure in a new measure (&lt;STRONG&gt;&lt;SPAN&gt;Disbursements Next Quarter BL1&lt;/SPAN&gt;&lt;/STRONG&gt;). This new measure is related to a date table.&lt;/P&gt;&lt;P&gt;If I use the dynamic measure to calculate the new measure it gives me output on a&amp;nbsp;total level but doesn't output the row context I want to see in my Report view.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way I can use this measure in my new measure without adding columns or hard coding the output?&lt;/P&gt;&lt;P&gt;Unfortunately I can't share my data as it's my companies data. If necessary I can make dummy data but I figured this question might not require actual data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DAX&lt;/STRONG&gt;&amp;nbsp;formula:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Disbursements Next Quarter BL1 = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR _NQ = SELECTEDVALUE( 'Datumtabel'[rYearQuarter] )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR Unfunded = [BL1 Unfunded Old Contracts]&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;RETURN &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SUMX(Contracttbl;Contracttbl[Commitment left EURO])*Unfunded;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ALL( 'Datumtabel' );&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;'Contracttbl'[Business line]="Support to early stage finance activities";&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;TREATAS( { _NQ + 1 }; 'Datumtabel'[rYearQuarter])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Result in report view:&lt;/STRONG&gt;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;SCBD Number&lt;/TD&gt;&lt;TD&gt;Disbursements Next Quarter BL1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Total&lt;/TD&gt;&lt;TD&gt;381.709,52&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is correct for the total amount, however I want it to show different SCBD number rows. DAX only gives me different rows in the report view when I write this:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DAX&lt;/STRONG&gt;:&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;Disbursements Next Quarter BL1 = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR _NQ = SELECTEDVALUE( 'Datumtabel'[rYearQuarter] )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR Unfunded = 0,9339&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;RETURN &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SUMX(Contracttbl;Contracttbl[Commitment left EURO])*Unfunded;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ALL( 'Datumtabel' );&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;'Contracttbl'[Business line]="Support to early stage finance activities";&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;TREATAS( { _NQ + 1 }; 'Datumtabel'[rYearQuarter])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&lt;STRONG&gt;Result in report view:&lt;/STRONG&gt;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;SCBD Number&lt;/TD&gt;&lt;TD&gt;Disbursements Next Quarter BL1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;SCBD-1018-01&lt;/TD&gt;&lt;TD&gt;58.275,36&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;SCBD-1020-01&lt;/TD&gt;&lt;TD&gt;74.326,85&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;SCBD-1020-02&lt;/TD&gt;&lt;TD&gt;0,00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;SCBD-1021-01&lt;/TD&gt;&lt;TD&gt;249.163,88&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Total&lt;/TD&gt;&lt;TD&gt;381.709,52&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Fri, 21 Aug 2020 13:28:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-in-a-measure-skips-row-context-in-report-view/m-p/1314856#M23056</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-08-21T13:28:52Z</dc:date>
    </item>
    <item>
      <title>Re: Measure in a measure skips row context in report view</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-in-a-measure-skips-row-context-in-report-view/m-p/1314910#M23063</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Your measure&amp;nbsp;&lt;SPAN&gt;[BL1 Unfunded Old Contracts]&amp;nbsp; is stored in a variable so it doesn't recalculate within SUMX, call the measure directly win SUMEX like below.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Disbursements Next Quarter BL1 =
VAR _NQ =
    SELECTEDVALUE ( 'Datumtabel'[rYearQuarter] )
//VAR Unfunded = 0,9339
RETURN
    CALCULATE (
        SUMX ( Contracttbl; Contracttbl[Commitment left EURO] ) * [BL1 Unfunded Old Contracts];
        ALL ( 'Datumtabel' );
        'Contracttbl'[Business line] = "Support to early stage finance activities";
        TREATAS ( { _NQ + 1 }; 'Datumtabel'[rYearQuarter] )
    )&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;________________________&lt;/P&gt;&lt;P&gt;Did I answer your question? Mark this post as a solution, this will help others!.&lt;/P&gt;&lt;P&gt;Click on the Thumbs-Up icon if you like this reply &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;&lt;A href="https://www.youtube.com/channel/UCKwBEguA8IlBubIobaOormg?sub_confirmation=1" target="_blank"&gt;YouTube, &lt;/A&gt;&lt;A href="https://linkedin.com/in/fowmy" target="_blank"&gt;LinkedIn&lt;/A&gt;&lt;/I&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Aug 2020 13:46:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-in-a-measure-skips-row-context-in-report-view/m-p/1314910#M23063</guid>
      <dc:creator>Fowmy</dc:creator>
      <dc:date>2020-08-21T13:46:59Z</dc:date>
    </item>
    <item>
      <title>Re: Measure in a measure skips row context in report view</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-in-a-measure-skips-row-context-in-report-view/m-p/1314918#M23064</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have you tried viewing your dynamic measure by SCBD number to make sure your measure slices data by SCBD? Does it return correct numbers for each row? It is better to test your first measure and then tackle the second measure?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Fri, 21 Aug 2020 13:50:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-in-a-measure-skips-row-context-in-report-view/m-p/1314918#M23064</guid>
      <dc:creator>saraMissBI</dc:creator>
      <dc:date>2020-08-21T13:50:05Z</dc:date>
    </item>
    <item>
      <title>Re: Measure in a measure skips row context in report view</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-in-a-measure-skips-row-context-in-report-view/m-p/1315287#M23076</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="179989" data-lia-user-login="saraMissBI" class="lia-mention lia-mention-user"&gt;saraMissBI&lt;/a&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="52518" data-lia-user-login="Fowmy" class="lia-mention lia-mention-user"&gt;Fowmy&lt;/a&gt;&amp;nbsp;. Thanks for your help! I figured it out thanks to your help. The rows that the measure calculated to were no the same rows as the new measure calculated. I ended up making a calculated column in another table to preserve the row context in the new measure.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Aug 2020 15:53:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-in-a-measure-skips-row-context-in-report-view/m-p/1315287#M23076</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-08-21T15:53:34Z</dc:date>
    </item>
  </channel>
</rss>

