Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Chris2016
Resolver I
Resolver I

Retrieve blanks in new table when using the summarizecolumns function

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]
)
 
The database looks somehting like this, with measures for Manufactured, Released, Designed. E.g.: 
DesignedCars = SUM('Table'[Designed]

CarIDStatusManufacturedReleasedDesigned
123Go111
124No go111
125Go111
126Go1 1
127Go1 1
128Go  1
129Go   
130No go   

The Query results are these:
CarIDStatusManufacturedCarsReleasedDesigned
123Go111
125Go111
124No go111
128Go  1
 
As you can see, even though I specified CarIDs 129,130 in the query, I am not getting them because the measures for these are blank. How can I modify my query so I get the values for 129,130 even though they have blank measures?

Sample pbix can be dowloaded here: https://www.transfernow.net/dl/202303032OpZwtOO
Thanks!
1 ACCEPTED SOLUTION
OwenAuger
Super User
Super User

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.

OwenAuger_0-1677926195954.png

 


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
LinkedIn

View solution in original post

3 REPLIES 3
OwenAuger
Super User
Super User

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.

OwenAuger_0-1677926195954.png

 


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
LinkedIn

Hi, Owen,

 

Thanks so much! The first solution works!

Chris2016_1-1678093552934.png

 



The second is retreiving all ids in the table, and that is not desired:

Chris2016_0-1678093510617.png

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


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
LinkedIn

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.