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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
lt79_Pax
Helper II
Helper II

Auto exist behavior query error

Dear Power BI Representative,
I am reviewing Chapter 13 of Authoring Queries within 'The Definitive Guide To DAX' guidebook and
I received this error message when I tried to enter the expression.:
Query (848, 4) A single value for column 'Category' in table 'Product' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as a min, max, count, or sum to get a single result.
Query batch completed with errors
EVALUATE
TOPN (
501,
SELECTCOLUMNS ( /*provides the list of output column values and does not control for duplicates similar to SQL Select*/
KEEPFILTERS ( /*does not allow for filter context overrides and will show metric outputs specific to the filter context filtered in the expression*/
FILTER ( /*iterates the table for the specific condition*/
KEEPFILTERS (/*does not allow for filter context overrides and will show metric outputs specific to the filter context filtered in the expression*/
SUMMARIZECOLUMNS ( /*cross joins to output combinations of the attribute values eliminating blanks*/
'Date'[Calendar Year],/*Note there are years without sales*/
'Product'[Category],
"CountRowsSales", CALCULATE (/*overrides filter contexts*/ COUNTROWS ( 'Sales' ) )
)
),/*Table expression for FILTER*/
OR (/*filter component*/
NOT ( ISBLANK ( 'Date'[Calendar Year] ) ),
NOT ( ISBLANK ( 'Product'[Category] ) )/*forcing the output of blanks?*/
)
)
),
"'Date'[Calendar Year]",'Date'[Calendar Year],
"'Product'[Category",'Product'[Category]
),/*TOPN table expression*/
'Date'[Calendar Year],1,/*TOPN order by component ascending = 1*/
'Product'[Category],1
)

The inner SELECTCOLUMNS was able to resolve however for some reason the TOPN is not able to differentiate between the Product categories for each specific year. I do not understand why this query is not functioning. Please advise.

Thank you for your assistance in this matter.

2 REPLIES 2
Anonymous
Not applicable

Hi @lt79_Pax ,

Could you tell me if your problem has been solved?
If it is, kindly Accept it as the solution. More people will benefit from it.
Or you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file from your Onedrive for Business.


Best Regards,
Stephen Tao

Anonymous
Not applicable

Hi @lt79_Pax ,

 

Sorry for the late reply.

 

Please kindly refer to:

 

https://www.sqlbi.com/articles/dax-error-messages-in-power-bi/

 

This blog explains the causes and solutions of the error in detail.

 

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.