March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi all, I am trying to filter the SUMMARIZECOLUMNS by using the CALCULATETABLE, it prompted me an error message:
"SummarizeColumns can not have outside filter context"
My tabular version: 13.0.2213.0
EVALUATE
CALCULATETABLE(
SUMMARIZECOLUMNS(
'Product'[Model Name],
'Product'[Product Line],
'Product'[Product Name],
'Customer'[First Name],
'Customer'[Last Name],
"Internet Current Quarter Sales", [Internet Current Quarter Sales],
"Internet Total Sales", [Internet Total Sales]
),
'Internet Sales'[Order Date] > DATEVALUE("1 Jan 2011"),
OR('Geography'[Country Region Name] = "Australia", 'Geography'[Country Region Name] = "United States")
)
ORDER BY 'Product'[Model Name]
I can filter by put the FILTER function inside SUMMARIZECOLUMNS, however it gave me a different result (less records than expected) as the table was filtered before corss-join: https://docs.microsoft.com/en-us/dax/summarizecolumns-function-dax
EVALUATE
SUMMARIZECOLUMNS(
'Product'[Model Name],
'Product'[Product Line],
'Product'[Product Name],
'Customer'[First Name],
'Customer'[Last Name],
FILTER('Internet Sales', [Order Date] > DATEVALUE("1 Jan 2011")),
FILTER('Geography', [Country Region Name] = "Australia" || [Country Region Name] = "United States"),
"Internet Current Quarter Sales", [Internet Current Quarter Sales],
"Internet Total Sales", [Internet Total Sales]
)
ORDER BY 'Product'[Model Name]
filterTable:
A table expression which is added to the filter context of all columns specified as groupBy_columnName arguments. The values present in the filter table are used to filter before cross-join/auto-exist is performed.
Any idea how to achive the filter same as CALCULATETABLE function? Thank you.
As described in this article, the SUMMARIZECOLUMNS can only have outside filter context with Analysis Services 2016 SP1 and above
https://www.sqlbi.com/articles/introducing-summarizecolumns/
Is there any other way to achieve the outside filter without upgrade SSAS?
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
23 | |
16 | |
15 | |
7 | |
6 |
User | Count |
---|---|
33 | |
29 | |
16 | |
13 | |
12 |