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! Learn more

Reply
cristianml
Post Prodigy
Post Prodigy

ALLEXCEPT for multiple columns/Filters

Hi,

I need help with the following DAX formula:

VAR V1 = CALCULATE([Revenue],ALLEXCEPT(Revenue,Revenue[Contract]))
RETURN
DIVIDE([Revenue],V1)

cristianml_0-1670686454548.png

 

What I Need is to use different filters to calculate the % of total only for the information filtered so I can apply to other measures.

cristianml_1-1670686744429.png

 

The problem is when I use filters that is not "Contract" is calculating based on all that is not filtered. 

Meaning/Example: In this case When I filter by FY22 it gives 23,09 %  but I need 100% like above.

 

cristianml_2-1670687040380.png

Hope you can help me .

 

Thanks !

 

 

 

 

1 ACCEPTED SOLUTION
Mahesh0016
Super User
Super User

Hello @cristianml ,
% listPrice =
VAR V1 = CALCULATE([Total listPrice],ALLSELECTED(TrainingSample2[Business Segment]))

RETURN

DIVIDE([Total listPrice],V1,0)
Mahesh0016_0-1670826773921.png

 

Please try this one.

View solution in original post

4 REPLIES 4
Mahesh0016
Super User
Super User

Hello @cristianml ,
% listPrice =
VAR V1 = CALCULATE([Total listPrice],ALLSELECTED(TrainingSample2[Business Segment]))

RETURN

DIVIDE([Total listPrice],V1,0)
Mahesh0016_0-1670826773921.png

 

Please try this one.
Vilmar
Resolver I
Resolver I

Tente:

 

_01 % Revenue =
DIVIDE (
    [Revenue],
    CALCULATE ( [Revenue], REMOVEFILTERS ( [Revenue[Contract] ) )
)
Ashish_Mathur
Super User
Super User

Hi,

Share the download link of your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
DataInsights
Super User
Super User

@cristianml,

 

In your measure [_01 % Revenue], have you tried using V3 in line 6 instead of V1?

 

DIVIDE ( [Revenue], V3 )

 

This will cause the denominator (V3) to use the filter context that exists outside the visual (i.e. slicers and filters). If this doesn't solve the issue, please provide a link to a sample pbix using one of the file services like OneDrive.





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

Proud to be a Super User!




Helpful resources

Announcements
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!

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.

Top Solution Authors