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

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

Reply
Anonymous
Not applicable

ALLEXCEPT function showing me all dates on x-axis

Hi All, 

 

I was recently encountering an issue with not being able to correctly filter my graph for cumulative total. I think i've figured out what i need however now, i'm struggling to show the correct dates along my x-axis. 

 

Initially, i was using ALL function, however, this resulted in my not being able to slice my data using a category slicer. I then used ALLSELECTED, however, because i had a visual filter applied to my graph, it wasn't giving me the correct numbers. At last, i decided i needed 'ALLEXCEPT' as i didn't want my cumulative total to reset.

 

Now that i have this working, the issue i'm facing is that my x-axis is now showig me all the dates in my main date table. I want to only see the dates that are contained in my Fact table. 

 

When i was using the ALL function, i was able to achieve this through:
Calculate (['Total']), Filter(ALL('Sheet1'), 'Sheet1[Date'] <= MAX('Sheet1'[Date])

 

However, since i'm now havig to use 'ALLEXCEPT', when i use this logic, i'm unable to slice my graph which was the problem i was having initially. 


I've attached PBIX file with what i'm currently getting and i've included a table visual to show which dates i should be getting. If anything's unclear, please let me know. 

 

Thank you!!

1 ACCEPTED SOLUTION
AlB
Community Champion
Community Champion

Hi @Anonymous 

I'm a bit lost with what you are trying to do with the ALLEXCEPTs, ALLSELECTEDs etc. One quick option would be to just look at the measure that is giving you results where you want and use that to show the result of your new measure only when the first one is not blank.  See it all at work in the attached file (Page 1)

Cumulative Planned V2 = 
VAR aux_ =
    CALCULATE (
        [Total Planned],
        FILTER ( ALL ( DateT ), DateT[Date] <= MAX ( DateT[Date] ) )
    )
RETURN
    IF ( NOT ISBLANK ( [Cumulative Delivered ALL (VALUE TO STOP AT TODAY)] ), aux_ )

 

SU18_powerbi_badge

Please accept the solution when done and consider giving a thumbs up if posts are helpful. 

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

 

 

View solution in original post

1 REPLY 1
AlB
Community Champion
Community Champion

Hi @Anonymous 

I'm a bit lost with what you are trying to do with the ALLEXCEPTs, ALLSELECTEDs etc. One quick option would be to just look at the measure that is giving you results where you want and use that to show the result of your new measure only when the first one is not blank.  See it all at work in the attached file (Page 1)

Cumulative Planned V2 = 
VAR aux_ =
    CALCULATE (
        [Total Planned],
        FILTER ( ALL ( DateT ), DateT[Date] <= MAX ( DateT[Date] ) )
    )
RETURN
    IF ( NOT ISBLANK ( [Cumulative Delivered ALL (VALUE TO STOP AT TODAY)] ), aux_ )

 

SU18_powerbi_badge

Please accept the solution when done and consider giving a thumbs up if posts are helpful. 

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

 

 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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
Top Kudoed Authors