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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

ALLEXCEPT - how to respect the date column filter within a matrix visual

I have this measure - which when applied to a single date works fine. I want to be able to compare the percent of total for the date column. Currently when I add another date to the visual using the slicer, it recalculates the total as all dates included in the visual. 

 

1 Date (correct percentages)

eloomis_0-1707503052176.png

 

2 dates: percent of whole is calculated with all dates instead of for the individual dates.

eloomis_1-1707503081173.png

 

# Portfolio % = 
DIVIDE(
    [# Total_Market_Value_Base],
    CALCULATE(
        SUMX(FactPortfolioSectorDetails,[# Total_Market_Value_Base]),
        ALLSELECTED(FactPortfolioSectorDetails)
    )
)

 

 

I tried to use ALLEXCEPT instead and it just calculates 100% for every category.

 

# TEST Portfolio % = 
DIVIDE(
    [# Total_Market_Value_Base],
    CALCULATE(
        SUMX(FactPortfolioSectorDetails,[# Total_Market_Value_Base]),
        ALLEXCEPT(DimCalendar,DimCalendar[Date]),
        ALLEXCEPT(DimSector, DimSector[Sector], DimSector[Subcategory])
    )
)

 

 

eloomis_2-1707503210054.png

 

I also tried having my ALLSELECTED filter, then adding the ALLEXCEPT on top of it and got the same result as my original measure.

# TEST Portfolio % = 
DIVIDE(
    [# Total_Market_Value_Base],
    CALCULATE(
        SUMX(FactPortfolioSectorDetails,[# Total_Market_Value_Base]),
        ALLSELECTED(FactPortfolioSectorDetails),
        ALLEXCEPT(DimCalendar,DimCalendar[Date])
    )
)

eloomis_0-1707504086280.png

 

 

Thank you in advance.

2 ACCEPTED SOLUTIONS
lbendlin
Super User
Super User

You may want to consider using REMOVEFILTERS instead.  

 

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information or anything not related to the issue or question.

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

View solution in original post

talespin
Solution Sage
Solution Sage

hi @Anonymous ,

 

I am using AdventureWorks database. I have a Date Table and Fact Table linked on Order date.

[MSalesAmount] is nothing but SUM(SalesAmount).

 

Measure 

----------

Percent Of Total =
VAR _Total = CALCULATE([MSalesAmount], REMOVEFILTERS(DimProductCategory[EnglishProductCategoryName]) )
RETURN DIVIDE([MSalesAmount], _Total)
 
talespin_1-1707664300254.png

 

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

@talespin @lbendlin , I used REMOVEFILTERS instead and got my intended results, thanks very much.

hi @Anonymous 

 

You're welcome.

talespin
Solution Sage
Solution Sage

hi @Anonymous ,

 

I am using AdventureWorks database. I have a Date Table and Fact Table linked on Order date.

[MSalesAmount] is nothing but SUM(SalesAmount).

 

Measure 

----------

Percent Of Total =
VAR _Total = CALCULATE([MSalesAmount], REMOVEFILTERS(DimProductCategory[EnglishProductCategoryName]) )
RETURN DIVIDE([MSalesAmount], _Total)
 
talespin_1-1707664300254.png

 

lbendlin
Super User
Super User

You may want to consider using REMOVEFILTERS instead.  

 

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information or anything not related to the issue or question.

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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