<?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: Use a dax calculated table as a measure. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-a-dax-calculated-table-as-a-measure/m-p/4859816#M185377</link>
    <description>&lt;LI-CODE lang="markup"&gt;I am using a calculated table in my measure&lt;/LI-CODE&gt;
&lt;P&gt;You can technically do that but it makes no sense. calculated tables are immutable, and measures depend on filter context. That is why I proposed to use table variables instead as they can be dynamic and can work inside measures.&lt;/P&gt;</description>
    <pubDate>Mon, 27 Oct 2025 17:18:05 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2025-10-27T17:18:05Z</dc:date>
    <item>
      <title>Use a dax calculated table as a measure.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-a-dax-calculated-table-as-a-measure/m-p/4859466#M185357</link>
      <description>&lt;P&gt;I have created created a calculated table and it shows the data as I would like it.&lt;BR /&gt;&lt;BR /&gt;Apart from it's not dynamic.&amp;nbsp; So I wish to turn it into a measure and at the last step return the Growth value for the agent you can only have one Agent Full Name ever selected.&lt;BR /&gt;&lt;BR /&gt;This is an example entry of the calculated table&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Agent Full Name,&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Prev ,&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Last,&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Mid,&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Growth&amp;nbsp;&lt;/P&gt;&lt;P&gt;A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,&amp;nbsp; 01/09/2025 00:00:00,&amp;nbsp; &amp;nbsp;18/09/2025 00:00:00,&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 09/09/2025 00:00:00,&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0.789&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I don't want to do anything with growth apart from display the value.&amp;nbsp; It will eventually be displayed on area chart as a custom data label between the Prev and Last markers on the report.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The measure I created doesn't return anything.&amp;nbsp; I thought this was due to the time stamp in the date field even though it was 00:00:00.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So,&amp;nbsp;I connected my dates[date] field to the calculated table and created a table visual filtered to Agent A added the 'dates'date field and the growth field from the calculated table. This worked perfectly fine.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I am trying to use the calculated table logic in a measure and go one step further and filter by agent and when the current date is the same as what [mid] is then&amp;nbsp; display.&lt;BR /&gt;&lt;BR /&gt;I have broken my dax measure down in the power bi dax edittor and I have one row with the value I want see here, I am not showing the agents name but the field is populated.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;img /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the measue itself&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Agent Growth for Date Test = 

VAR _Agent = SELECTEDVALUE('CallsReviewScore'[Agent Full Name])
VAR _CurrentDate = MAX('Date'[Date])

-- Recreate your calculated table logic dynamically
VAR AgentDates =
    SUMMARIZE(
        'CallsReviewScore',
        'CallsReviewScore'[Agent Full Name],
        "Last", MAX('CallsReviewScore'[Created Date]),
        "Prev",
            CALCULATE(
                MAX('CallsReviewScore'[Created Date]),
                FILTER(
                    'CallsReviewScore',
                    'CallsReviewScore'[Agent Full Name] = EARLIER('CallsReviewScore'[Agent Full Name])
                        &amp;amp;&amp;amp; 'CallsReviewScore'[Created Date] &amp;lt;
                            CALCULATE(
                                MAX('CallsReviewScore'[Created Date]),
                                FILTER(
                                    'CallsReviewScore',
                                    'CallsReviewScore'[Agent Full Name] = EARLIER('CallsReviewScore'[Agent Full Name])
                                )
                            )
                )
            )
    )

-- Add Mid and Growth columns
VAR AgentDatesWithMid =
    ADDCOLUMNS(
        AgentDates,
        "Mid",
            VAR Prev = [Prev]
            VAR Last = [Last]
            RETURN
                IF(
                    OR(ISBLANK(Prev), ISBLANK(Last)),
                    BLANK(),
                    Prev + INT(DATEDIFF(Prev, Last, DAY) / 2)
                ),
        "Growth",
            VAR Agent = [Agent Full Name]
            VAR Prev = [Prev]
            VAR Last = [Last]
            VAR PrevScore =
                CALCULATE(
                    AVERAGE('CallsReviewScore'[Score]),
                    FILTER(
                        'CallsReviewScore',
                        'CallsReviewScore'[Agent Full Name] = Agent
                            &amp;amp;&amp;amp; 'CallsReviewScore'[Created Date] = Prev
                    )
                )
            VAR LastScore =
                CALCULATE(
                    AVERAGE('CallsReviewScore'[Score]),
                    FILTER(
                        'CallsReviewScore',
                        'CallsReviewScore'[Agent Full Name] = Agent
                            &amp;amp;&amp;amp; 'CallsReviewScore'[Created Date] = Last
                    )
                )
            RETURN
                DIVIDE(LastScore - PrevScore, PrevScore)
    )

-- Filter to selected agent and current date
VAR _Filtered =
    FILTER(
        AgentDatesWithMid,
        [Agent Full Name] = _Agent
            &amp;amp;&amp;amp; int([Mid]) &amp;gt;= _CurrentDate
            &amp;amp;&amp;amp; int([Mid]) &amp;lt;= _CurrentDate + 1
    )

-- Return the Growth
RETURN
MAXX(_Filtered, [Growth])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I the measure is working to a point as I can see the row when I use the dax edittor, the calculated table works and displays the value I want.&lt;BR /&gt;&lt;BR /&gt;I believe the issue is a date time stamp issue I have tried to address this with the int([mid]) statment and the &amp;lt;= and the &amp;gt;=&amp;nbsp;&lt;BR /&gt;I have placed the measue on a table with the dates'date' as well and placed on a card visual both filteres to the Agent and they return nothing.&lt;BR /&gt;But I am stuck at what to do next.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Oct 2025 12:28:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-a-dax-calculated-table-as-a-measure/m-p/4859466#M185357</guid>
      <dc:creator>jasemilly</dc:creator>
      <dc:date>2025-10-27T12:28:25Z</dc:date>
    </item>
    <item>
      <title>Re: Use a dax calculated table as a measure.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-a-dax-calculated-table-as-a-measure/m-p/4859712#M185371</link>
      <description>&lt;P&gt;Instead of a calculated table you can use a variable inside your measure.&amp;nbsp; The variable can be a table variable.&amp;nbsp; The only requirement is that the measure itself needs to return a scalar value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;New Measure :=&amp;nbsp;&lt;BR /&gt;var a = TOPN(10,'table')&lt;BR /&gt;RETURN COUNTROWS(a)&lt;/P&gt;</description>
      <pubDate>Mon, 27 Oct 2025 15:48:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-a-dax-calculated-table-as-a-measure/m-p/4859712#M185371</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2025-10-27T15:48:57Z</dc:date>
    </item>
    <item>
      <title>Re: Use a dax calculated table as a measure.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-a-dax-calculated-table-as-a-measure/m-p/4859810#M185376</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for replying but I don't understand how to use this in my situation, I am using a calculated table in my measure as I have proven this works, but is static.&amp;nbsp; I thought it would be easy to filter the calculated table in the measure and return a scalar value.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Oct 2025 17:09:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-a-dax-calculated-table-as-a-measure/m-p/4859810#M185376</guid>
      <dc:creator>jasemilly</dc:creator>
      <dc:date>2025-10-27T17:09:15Z</dc:date>
    </item>
    <item>
      <title>Re: Use a dax calculated table as a measure.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-a-dax-calculated-table-as-a-measure/m-p/4859816#M185377</link>
      <description>&lt;LI-CODE lang="markup"&gt;I am using a calculated table in my measure&lt;/LI-CODE&gt;
&lt;P&gt;You can technically do that but it makes no sense. calculated tables are immutable, and measures depend on filter context. That is why I proposed to use table variables instead as they can be dynamic and can work inside measures.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Oct 2025 17:18:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-a-dax-calculated-table-as-a-measure/m-p/4859816#M185377</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2025-10-27T17:18:05Z</dc:date>
    </item>
    <item>
      <title>Re: Use a dax calculated table as a measure.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-a-dax-calculated-table-as-a-measure/m-p/4860617#M185402</link>
      <description>&lt;P&gt;Remove the INT conversion and use direct date comparison:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Agent Growth for Date Test =&lt;BR /&gt;VAR _Agent = SELECTEDVALUE('CallsReviewScore'[Agent Full Name])&lt;BR /&gt;VAR _CurrentDate = MAX('Date'[Date])&lt;BR /&gt;VAR AgentDates =&lt;BR /&gt;SUMMARIZE(&lt;BR /&gt;'CallsReviewScore',&lt;BR /&gt;'CallsReviewScore'[Agent Full Name],&lt;BR /&gt;"Last", MAX('CallsReviewScore'[Created Date]),&lt;BR /&gt;"Prev", CALCULATE(&lt;BR /&gt;MAX('CallsReviewScore'[Created Date]),&lt;BR /&gt;FILTER(&lt;BR /&gt;ALL('CallsReviewScore'),&lt;BR /&gt;'CallsReviewScore'[Agent Full Name] = EARLIER('CallsReviewScore'[Agent Full Name]) &amp;amp;&amp;amp;&lt;BR /&gt;'CallsReviewScore'[Created Date] &amp;lt; MAX('CallsReviewScore'[Created Date])&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;VAR AgentDatesWithMid =&lt;BR /&gt;ADDCOLUMNS(&lt;BR /&gt;AgentDates,&lt;BR /&gt;"Mid", [Prev] + INT(DATEDIFF([Prev], [Last], DAY) / 2),&lt;BR /&gt;"Growth", &lt;BR /&gt;VAR PrevScore = CALCULATE(AVERAGE('CallsReviewScore'[Score]), 'CallsReviewScore'[Created Date] = [Prev])&lt;BR /&gt;VAR LastScore = CALCULATE(AVERAGE('CallsReviewScore'[Score]), 'CallsReviewScore'[Created Date] = [Last])&lt;BR /&gt;RETURN DIVIDE(LastScore - PrevScore, PrevScore)&lt;BR /&gt;)&lt;BR /&gt;RETURN&lt;BR /&gt;MAXX(&lt;BR /&gt;FILTER(&lt;BR /&gt;AgentDatesWithMid,&lt;BR /&gt;[Agent Full Name] = _Agent &amp;amp;&amp;amp;&lt;BR /&gt;[Mid] = _CurrentDate&lt;BR /&gt;),&lt;BR /&gt;[Growth]&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this answer helped, please click Kudos or mark as Solution.&lt;BR /&gt;-Kedar&lt;BR /&gt;LinkedIn: &lt;A href="https://www.linkedin.com/in/kedar-pande" target="_blank"&gt;https://www.linkedin.com/in/kedar-pande&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Oct 2025 13:03:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-a-dax-calculated-table-as-a-measure/m-p/4860617#M185402</guid>
      <dc:creator>Kedar_Pande</dc:creator>
      <dc:date>2025-10-28T13:03:49Z</dc:date>
    </item>
    <item>
      <title>Re: Use a dax calculated table as a measure.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-a-dax-calculated-table-as-a-measure/m-p/4861471#M185435</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Thanks for the response, originally the measure didn't include the int() function I only included to try and resolve issue same goes for the greater than and less than check.&lt;BR /&gt;&lt;BR /&gt;I have just tried again, and I still have the issue&lt;/P&gt;</description>
      <pubDate>Wed, 29 Oct 2025 10:03:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-a-dax-calculated-table-as-a-measure/m-p/4861471#M185435</guid>
      <dc:creator>jasemilly</dc:creator>
      <dc:date>2025-10-29T10:03:41Z</dc:date>
    </item>
    <item>
      <title>Re: Use a dax calculated table as a measure.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-a-dax-calculated-table-as-a-measure/m-p/4864934#M185534</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="181440" data-lia-user-login="jasemilly" class="lia-mention lia-mention-user"&gt;jasemilly&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Please provide sample data that covers your issue or question&amp;nbsp;&lt;STRONG&gt;completely&lt;/STRONG&gt;, in a&amp;nbsp;&lt;STRONG&gt;usable&lt;/STRONG&gt;&amp;nbsp;format (not as a screenshot).&lt;/P&gt;
&lt;P&gt;Do not include sensitive information. Do not include anything that is unrelated to the issue or question.&lt;/P&gt;
&lt;P&gt;Please show the expected outcome based on the sample data you provided.&lt;BR /&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Mon, 03 Nov 2025 11:22:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-a-dax-calculated-table-as-a-measure/m-p/4864934#M185534</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-11-03T11:22:05Z</dc:date>
    </item>
    <item>
      <title>Re: Use a dax calculated table as a measure.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-a-dax-calculated-table-as-a-measure/m-p/4868189#M185612</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="181440" data-lia-user-login="jasemilly" class="lia-mention lia-mention-user"&gt;jasemilly&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I wanted to check if you had the opportunity to review to share the requested information , so that we could look into it. Please feel free to contact us if you have any further questions.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Nov 2025 09:18:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-a-dax-calculated-table-as-a-measure/m-p/4868189#M185612</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-11-10T09:18:36Z</dc:date>
    </item>
    <item>
      <title>Re: Use a dax calculated table as a measure.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-a-dax-calculated-table-as-a-measure/m-p/4870776#M185693</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="181440" data-lia-user-login="jasemilly" class="lia-mention lia-mention-user"&gt;jasemilly&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;May I check if this issue has been resolved? If not, Please feel free to contact us with the requested data if you have any further questions.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Mon, 10 Nov 2025 09:18:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-a-dax-calculated-table-as-a-measure/m-p/4870776#M185693</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-11-10T09:18:22Z</dc:date>
    </item>
  </channel>
</rss>

