Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
I am using a query such as the following to retrieve data from Analysis Services:
Query = SUMMARIZECOLUMNS(
'Table'[CarID],
'Table'[Status],
KEEPFILTERS( TREATAS( {123,124,125,128,129,130}, 'Table'[CarID] )),
"ManufacturedCars", [ManufacturedCars],
"Released", [ReleasedCars],
"Designed", [DesignedCars]
)
123 | Go | 1 | 1 | 1 |
124 | No go | 1 | 1 | 1 |
125 | Go | 1 | 1 | 1 |
126 | Go | 1 | 1 | |
127 | Go | 1 | 1 | |
128 | Go | 1 | ||
129 | Go | |||
130 | No go |
123 | Go | 1 | 1 | 1 |
125 | Go | 1 | 1 | 1 |
124 | No go | 1 | 1 | 1 |
128 | Go | 1 |
Solved! Go to Solution.
Hi @Chris2016
Try either of these:
1. Wrap every "Expression" argument of SUMMARIZECOLUMNS in IGNORE:
SUMMARIZECOLUMNS(
'Table'[CarID],
'Table'[Status],
KEEPFILTERS( TREATAS( {123,124,125,128,129,130}, 'Table'[CarID] )),
"ManufacturedCars", IGNORE ( [ManufacturedCars] ),
"Released", IGNORE ( [ReleasedCars] ),
"Designed", IGNORE( [DesignedCars] )
)
2. Wrap SUMMARIZECOLUMNS with ADDMISSINGITEMS as follows:
ADDMISSINGITEMS (
'Table'[CarID],
'Table'[Status],
SUMMARIZECOLUMNS(
'Table'[CarID],
'Table'[Status],
KEEPFILTERS( TREATAS( {123,124,125,128,129,130}, 'Table'[CarID] )),
"ManufacturedCars", [ManufacturedCars],
"Released", [ReleasedCars],
"Designed", [DesignedCars]
),
'Table'[CarID],
'Table'[Status]
)
I couldn't open your PBIX to verify due to "sensitivity labels" error, but hopefully these work.
Hi @Chris2016
Try either of these:
1. Wrap every "Expression" argument of SUMMARIZECOLUMNS in IGNORE:
SUMMARIZECOLUMNS(
'Table'[CarID],
'Table'[Status],
KEEPFILTERS( TREATAS( {123,124,125,128,129,130}, 'Table'[CarID] )),
"ManufacturedCars", IGNORE ( [ManufacturedCars] ),
"Released", IGNORE ( [ReleasedCars] ),
"Designed", IGNORE( [DesignedCars] )
)
2. Wrap SUMMARIZECOLUMNS with ADDMISSINGITEMS as follows:
ADDMISSINGITEMS (
'Table'[CarID],
'Table'[Status],
SUMMARIZECOLUMNS(
'Table'[CarID],
'Table'[Status],
KEEPFILTERS( TREATAS( {123,124,125,128,129,130}, 'Table'[CarID] )),
"ManufacturedCars", [ManufacturedCars],
"Released", [ReleasedCars],
"Designed", [DesignedCars]
),
'Table'[CarID],
'Table'[Status]
)
I couldn't open your PBIX to verify due to "sensitivity labels" error, but hopefully these work.
Hi, Owen,
Thanks so much! The first solution works!
The second is retreiving all ids in the table, and that is not desired:
Thanks a lot for your help!
You're welcome 🙂
Actually the reason the 2nd expression using ADDMISSINGITEMS didn't work as expected is that, in order to apply any filters to the set of rows returned, it needs to be provided a FilterTable argument.
However, as the syntax gets quite verbose, it's probably easiest to stick with the 1st expression.
Regards
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
22 | |
7 | |
6 | |
6 | |
6 |
User | Count |
---|---|
27 | |
12 | |
10 | |
9 | |
6 |