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! Request now

Reply
littlemojopuppy
Community Champion
Community Champion

Retaining Date Slicers in Measure Calculations

Good afternoon!  Would like to ask for some help if anyone is willing.

 

I have this:

Annotation 2019-10-27 121645.png
Dates are filtered in the slicer AND there is a filter in each of the gauges for most recent calendar month.  The measure for no-show advance cancel and same day cancel rates all calculate fine.  The problem is the measure for target...I'm intending to calculate the organizational rate regardless of any values selected in any slicer but still keep the date slicer for the most recent calendar month.  Here's code for the no-show rate (other two are almost identical):

Organization No Show Rate = 
    VAR
        NoShows =
            COUNTROWS(
                FILTER(
                    ALLEXCEPT(
                        'Patient No Shows',
                        'Patient No Shows'[ApptStart]
                    ),
                    'Patient No Shows'[Status] = "No show"
                )
            )
    VAR
        OutpatientVisits = 
            SUMX(
                FILTER(
                    ALLEXCEPT(
                        'Actual Visits',
                        'Actual Visits'[Period]
                    ),
                    'Actual Visits'[OP/IP/DEL] = "OP"
                ),
                'Actual Visits'[Actual Encounters]
            )
    VAR
        TotalVisits = OutpatientVisits + NoShows
    RETURN

    DIVIDE(
        NoShows,
        TotalVisits,
        BLANK()
    )

This is calculating the historical no-show rate for all time - it's ignoring all date filters.  And I believe it's because of the ALLEXCEPT function.

 

I think that the solution would involve using the EARLIER function to keep the date filter from the gauge, but I've tried a couple of different times and I either get errors or results that don't make any sense.  Would anyone offer some advice on how to correct this?

 

Thank you!

2 REPLIES 2
v-yuta-msft
Community Support
Community Support

@littlemojopuppy ,

 

Could you please share sample data and give the expected result?

 

Regards,

Jimmy Tao

I can't share data because it would violate just about every HIPAA rule that exists.

The expected result is to calculate the rates for the most recent calendar month for which data is available.  The formula is mostly laid out...it comes down to limiting it to just the most recent month.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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