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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

summarize and allexcept

Hello, 

 

My question is how can i use allexcept function to refer to a table which i have calculated (i.e. summarize)?

 

Here is the calculated table:

 

Lookup table = SUMMARIZE(FILTER(Table1,Table1[ConditionType]="PREPAID"), Table2[ObjID],
Table2[Cities],
Table2[Countries],
"SUM",
SUM(Table1[Amount/Year])

)

 

My goal is to add another column after "SUM" to get the average per cities and per countries. I was thinking of using average function and allexcept. Is there a way for allexcept to refer to Lookup table? or it will refer to the table2? my idea is if i can do this:

 

Lookup table = SUMMARIZE(FILTER(Table1,Table1[ConditionType]="PREPAID"), Table2[ObjID],
Table2[Cities],
Table2[Countries],
"SUM",
SUM(Table1[Amount/Year]),

"AVE Cities",

CALCULATE(AVERAGE(Table1[Amount/Year]),ALLEXCEPT(Lookuptable, Lookuptable[Cities]))

)

 

But it appears i can't do this since it still inside the calculated formula of the table. I tried adding calculated column, but somehow it is not working. 

2 REPLIES 2
az38
Community Champion
Community Champion

Hi @Anonymous 

try ADDCOLUMNS. like this

Lookup table = 
ADDCOLUMNS(
SUMMARIZE(FILTER(Table1,Table1[ConditionType]="PREPAID"), Table2[ObjID],
Table2[Cities],
Table2[Countries],
"SUM",
SUM(Table1[Amount/Year])),
"AVE Cities",
CALCULATE(AVERAGE(Table1[Amount/Year]),ALLEXCEPT(Lookuptable, Lookuptable[Cities]))
)

do not hesitate to give a kudo to useful posts and mark solutions as solution

 


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
Anonymous
Not applicable

It seems i still can not access the "lookup table" for the allexcept since it is within the lookup table formula even if i add addcolumns

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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