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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
ryan_b_fiting
Post Patron
Post Patron

Count future values regardless of slicer range

Hello Community - 

 

I have an issue I am facing regarding the measuring of future values.  I have a date slicer on my report page (from a calendar table that is then joined to other tables)

Date Slicer.PNG

Despite that filter which i needed for many of the metrics, I also have patients that book appointments into the future which I will see the appointments with a future appointment date on them (ie 5/3/2022 6/3/2022 etc).

I need to be able to calculate all appointments that are within the slicer range, but then also include ALL appointments that have a future date associated with them.  So my calculation currently is:

Booked Appointments = CALCULATE(
    '1-Measures'[Appointments],
       ALL(Date_Table) )

but this gives me all appointments that are prior to my date slicer range as well.  What filter context do I need to put on my measure to get it to include all Appointments within the sliced range AND BEYOND?

Thank You Community

Ryan

1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

@ryan_b_fiting 

Try something like this.

Booked Appointments =
VAR _MinDate =
    MIN ( Date_Table[Date] )
RETURN
    CALCULATE (
        '1-Measures'[Appointments],
        ALL ( Date_Table ),
        Date_Table[Date] >= _MinDate
    )

View solution in original post

3 REPLIES 3
jdbuchanan71
Super User
Super User

@ryan_b_fiting 

Try something like this.

Booked Appointments =
VAR _MinDate =
    MIN ( Date_Table[Date] )
RETURN
    CALCULATE (
        '1-Measures'[Appointments],
        ALL ( Date_Table ),
        Date_Table[Date] >= _MinDate
    )

Thanks @jdbuchanan71 this worked perfect.

Greg_Deckler
Community Champion
Community Champion

@ryan_b_fiting Use MAX to get your max date range. Then include > that date in your CALCULATE as a filter statement along with your ALL.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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