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
Anonymous
Not applicable

SUMMARIZE and ALLEXCEPT throwing error

Hi all,

 

I'm building up a rather complex measure but I'm getting a strange error thrown at me. Here's the beginning stage of my measure: 

_Measure Draft = maxx(SUMMARIZE(ALLEXCEPT('Table', 'Table'[SERVICE_WEEK]), [SERVICE_WEEK], "Max Date", max('Table'[SERVICE_DATE]), "Count Days", DISTINCTCOUNT('Table'[SERVICE_DATE])), [SERVICE_WEEK])
 
The error I get is "The column 'SERVICE_WEEK' specified in the 'SUMMARIZE' function was not found in the input table." When I replace the ALLEXCEPT with ALL and remove Service Week as the filter exception, the error goes away so I'm guessing the issue has to do with the interaction between the ALLEXCEPT and the SUMMARIZE functions. Does anyone have any ideas of what could be happening?
1 ACCEPTED SOLUTION
Anonymous
Not applicable

https://dax.guide/allexcept/ - If you read this, you'll know immediately why your code returns the error.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

https://dax.guide/allexcept/ - If you read this, you'll know immediately why your code returns the error.
amitchandak
Super User
Super User

@Anonymous , If you need to group data by week level you don't need all except, because summarize id going to group it

 

Measure Draft = maxx(SUMMARIZE('Table', 'Table'[SERVICE_WEEK], "Max Date", max('Table'[SERVICE_DATE]), "Count Days", DISTINCTCOUNT('Table'[SERVICE_DATE])), [SERVICE_WEEK])

 

what is the benefit SUMMARIZE of MAX on service week? That is not using any inner measure 

 

like, Sum the distinct day by week

Measure Draft = Sumx(SUMMARIZE('Table', 'Table'[SERVICE_WEEK], "Max Date", max('Table'[SERVICE_DATE]), "Count Days", DISTINCTCOUNT('Table'[SERVICE_DATE])), [Count Days])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
DataInsights
Super User
Super User

@Anonymous, the ALLEXCEPT function removes the column SERVICE_WEEK, which makes it unavailable to SUMMARIZE. Try rewriting the SUMMARIZE portion like this:

 

ADDCOLUMNS (
   SUMMARIZE ( 'Table', 'Table'[SERVICE_WEEK] ),
   "Max Date", MAX ( 'Table'[SERVICE_DATE] ),
   "Count Days", DISTINCTCOUNT ( 'Table'[SERVICE_DATE] )
)

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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.