Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hello Fellow Daxers,
I have created a table using SUMMARIZE and ADDCOLUMNS. Now I’m stumped…when I try to compute the MIN() of a column in this Memory table, I get the error:
Table variable 'SummarizeTrendsTable' cannot be used in current context because a base table is expected.
(Incidentally, I have confirmed that the SUMMARIZE and ADDCOLUMNS code works…by looking at the results if I create a “New Table” with the code. Not what I'm doing, mind you, but just to be sure I know it works)
Is it true I can’t use the MIN() function a “Memory Table”?
Thank you in advance! Tom
Here’s the ADDCOLUMNS and SUMMARIZE code with the . It's a small table--about 15 rows each time it's "called".
TestForForum =
(some housekeeping: create LastValue, VariableName, ProviderNo)
VAR SummarizeTrendsTable =
ADDCOLUMNS(
SUMMARIZE( FILTER(Tr_Select,AND(Tr_Select[Variable_Name] = VariableName, Tr_Select[ProvdrNo] = ProviderNo)),
Tr_Select[Measure End Date],
Tr_Select[ProvdrNo],
"MetricValue" , AVERAGE(Tr_Select[Variable_Value])),
"LastValue" , LastValue,
"DataTrend" , DIVIDE((LastValue - [MetricValue])* 100 ,[MetricValue]))
RETURN
MIN(SummarizeTrendsTable[DataTrend])//<---here’s the MIN() function.
Solved! Go to Solution.
@ThomasDay
I am not sure in which context you want to use this table; yet,
MINX should work
MINX ( SummarizeTrendsTable, [DataTrend] )
________________________
Did I answer your question? Mark this post as a solution, this will help others!.
Click on the Thumbs-Up icon if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
I've fixed the second problem by using the filter function with same "pattern" as @Fowmy used in first reply.
CALCULATE(MINX(SummarizeTrendsTab,[DataTrend]),FILTER(SummarizeTrendsTable,[MonthsDuration] > 0))
@ThomasDay
I am not sure in which context you want to use this table; yet,
MINX should work
MINX ( SummarizeTrendsTable, [DataTrend] )
________________________
Did I answer your question? Mark this post as a solution, this will help others!.
Click on the Thumbs-Up icon if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
But that leads to the next issue: When I use the MINX within a Calculate Statement to filter...per the below, I get the error
"Cannot find table 'SummarizeTrendsTable'"
Does that make sense to you?
CALCULATE(MINX(SummarizeTrendsTab[DataTrend]),SummarizeTrendsTable[MonthsDuration] > 0)
I've fixed the second problem by using the filter function with same "pattern" as @Fowmy used in first reply.
CALCULATE(MINX(SummarizeTrendsTab,[DataTrend]),FILTER(SummarizeTrendsTable,[MonthsDuration] > 0))
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
144 | |
75 | |
63 | |
51 | |
48 |
User | Count |
---|---|
211 | |
86 | |
64 | |
59 | |
56 |