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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
AlejandroPCar
Helper IV
Helper IV

ALLEXCEPT Issue

Hi!, 

 

I've found the following issue with ALLEXCEPT function:


My formula  --->  Valores CIIU =
 VAR ValoresCIIU = CALCULATE( [Semana Valores], ALLEXCEPT( CIIU, CIIU[id_clase] ) )
RETURN
 ValoresCIIU

This formula does not work as I expect it should. The result is the same to my [Semana Valores]

measure and when I put it in a matrix for see the result, as you can see, both formulas do the same, so ALLEXCEPT is not working. I want the formula show me the CIIU result (in table would be the 111 value or 17,570,148) for every row of every company that belongs to its respective CIIU. 

TablaALLEXCEPT.png Here is my pbix file if it would be needed. https://1drv.ms/u/s!AtTnrgPUQzQCkFc5l7kMeLoe7z9X


Thanks a lot!

 

 

2 REPLIES 2
v-sihou-msft
Microsoft Employee
Microsoft Employee

@AlejandroPCar

 

In your scenario, your CIIU[id_clase] and [Empresa] fields are from different table. These two fields have no direct relationship. So when you put both feilds into matrix and drill down into one level, it can't make the calculation group on CIIU[id_clase] with ALLEXCEPT(). 

 

Their "relationship" is actually described in your fact table "Estado_Resultados". So you should put Estado_Resultados[id_ClaseCIIU4F] into matrix and ALLEXCEPT() on this column. But I still can't figure out why the measure can't take your report filter "departmentno <> BLANK()". So I hard code the filter into the measure:

 

Measure = CALCULATE( [Semana Valores], ALLEXCEPT( Estado_Resultados,  Estado_Resultados[id_ClaseCIIU4F] ),FILTER(Geografia,Geografia[departamento]<>BLANK()))

23.PNG

 

 

Hi @v-sihou-msft

 

Thank you very much for your response.  It seems like it works like I want, but the problem is it does not work for me if the ALLEXCEPT filter come from the main table Estado_Resultados, because the filters I need for ALLEXCEPT are in  CIIU table. Is there a way to do that? I mean use the CIIU table as an argument of ALLEXCEPT, I saw examples in power bi pages where it could be donde. What I am doing wrong? 

 

Thanks again for your answer.

 

 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

July Power BI Update Carousel

Power BI Monthly Update - July 2026

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

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors