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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.