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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Help with Calculate arguments

I have a table visual with a measure, and one of the columns in the visual needs to be ignored in caulcating the measure.  I can use the ALL argument, but then it also ignores a slicer I have on the report (because they are consuming the same table column)

 

Is there a way to force the measure to ignore the column in the visual, but not the slicer...?

5 REPLIES 5
v-juanli-msft
Community Support
Community Support

Hi @Anonymous

Try to use ALLEXCEPT instead of ALL, put the column "a" which is used in a slicer to the ALLEXCEPT like this "ALLEXCEPT(table,table[a])

 

Best Regards

Maggie

Anonymous
Not applicable

Unfortunately, that doesn't work.

 

Data Table:

IDAgeCountry
133Canada
244USA
355USA
443Canada
554USA
675America
712America
847Canada
923USa
1038Canada

 

 

Mapping Table 

CountryMapped
CanadaCanada
USAUSA
AmericaUSA

 

 

There is a relationship between Country for both tables.  I have one measure:  Measure = Average(Sheet1[Age])

Here is the Table Visual with the measure as is:
2018-06-15_8-55-45.png

So I adjust the measure to be: Measure = CALCULATE(Average(Sheet1[Age]),all(Sheet1[ID]))

Now it looks likes this:

 

2018-06-15_8-58-15.png

 

You can see how it now shows duplicates for every value in the mapping table, and the average age is for for mapped country.  So I try:  Measure = CALCULATE(Average(Sheet1[Age]),allexcept(Sheet1,Sheet1[Country]))

2018-06-15_9-01-02.png

The average age is correct, but the duplicates are still there.

 

 

What's your desired output? It looks like the measure is working

Anonymous
Not applicable

If you look at the last visual, it gives the impression that ID 1 is in both countries.  I want to display the average of all ages in the data, regardless of country, but I also want the report user to be able to see what country they ID belongs to.  I just can't seem to make it work.

 

My second requirement, which adds complexity to all this, is a slicer FOR country.  When Canada is selected, the table visual will ONLY show the average age for Canada, and will ONLY show Canadian IDs. When both countries are selected, it will take the average across both countries and show IDs in both countries.

 

I get that i can use a 2nd visual for the average, but this is just a simplified example to illustrate my problem. I have to have the measure in the table.

 

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors