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

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

Reply
Anonymous
Not applicable

ALLEXEPT function doesn't work with date slicer

khaledbouj_0-1678128523257.png

 

 

AAA = CALCULATE(SUMX(Impaye,Impaye[Nombre Impaye]), ALLEXCEPT(Impaye,Impaye[IdPretAide]))

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

Is [Nombre Imapye] a measure or a column?

If it's a measure, please try

AAA =
SUMX (
    FILTER ( ALL ( Impaye ), [IdPretAide] = MAX ( Impaye[IdPretAide] ) ),
    [Nombre Impaye]
)

If it's a column, please try

AAA =
SUMX (
    FILTER ( ALL ( Impaye ), [IdPretAide] = MAX ( Impaye[IdPretAide] ) ),
    SUM ( Impaye[Nombre Impaye] )
)

If you still have doubts, provide some dummy sample data, along with the desired results. If [Nombre Impaye] is a measure, please provide a description of this formula. Remember to protect data privacy.

 

                                                                                                                                                         

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.           

View solution in original post

8 REPLIES 8
Anonymous
Not applicable

Hi @Anonymous ,

 

Is [Nombre Imapye] a measure or a column?

If it's a measure, please try

AAA =
SUMX (
    FILTER ( ALL ( Impaye ), [IdPretAide] = MAX ( Impaye[IdPretAide] ) ),
    [Nombre Impaye]
)

If it's a column, please try

AAA =
SUMX (
    FILTER ( ALL ( Impaye ), [IdPretAide] = MAX ( Impaye[IdPretAide] ) ),
    SUM ( Impaye[Nombre Impaye] )
)

If you still have doubts, provide some dummy sample data, along with the desired results. If [Nombre Impaye] is a measure, please provide a description of this formula. Remember to protect data privacy.

 

                                                                                                                                                         

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.           

andhiii079845
Solution Sage
Solution Sage

Can you add a

ALLSELECTED() to 
RESULT = Calculate(A,ALLEXCEPT(...),ALLSELECTED())




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

Proud to be a Super User!




Anonymous
Not applicable

doesn't work like this : 

AA =
               
VAR EndDate = MAX( Impaye[Code Date] )

VAR StartDate = MIN( Impaye[Code Date] )

VAR A = CALCULATE(SUMX(Impaye,Impaye[Nombre Impaye]), 'Impaye'[Code Date] >= StartDate && 'Impaye'[Code Date] <= EndDate)

VAR Result = CALCULATE(A,ALLEXCEPT(Impaye,Impaye[IdPretAide]),ALLSELECTED())

RETURN Result

Perhaps someone else knows a good solution. I would try to use summerize to have the sum per idpretaide and do than the further operations. 





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

Proud to be a Super User!




andhiii079845
Solution Sage
Solution Sage

Sorry, i did not understand your problem. What do you want to see? 





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

Proud to be a Super User!




Anonymous
Not applicable

I want to calculate the of sum of "impaye" by "idpretaide", i used the function allexecpt to group the sum of "impaye" by "idpretaide", it work in total, but when i filter with date slicer, it give me the total, i need to have the sum of "impaye" by "idpretaide" working with the slicer code date.

Add to your DAX a variable which calulated the total for the date range. 





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

Proud to be a Super User!




Anonymous
Not applicable

I added this : 

AA =
               
VAR EndDate = MAX( Impaye[Code Date] )

VAR StartDate = MIN( Impaye[Code Date] )

VAR A = CALCULATE(SUMX(Impaye,Impaye[Nombre Impaye]), 'Impaye'[Code Date] >= StartDate && 'Impaye'[Code Date] <= EndDate)

VAR Result = CALCULATE(A,ALLEXCEPT(Impaye,Impaye[IdPretAide]))
 
it work in total : but i want to display the total in line : all line of "AA" must be 10 and not 1;1;1 ... : 
khaledbouj_0-1678129438875.png

 

 
 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

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

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.