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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
StanleyBlack
Helper I
Helper I

Do not allow a measure element to be filtered

Afternoon everyone,

 

I have a load of tiered measures and have run into a problem. I use this to calculate the number of students below 90%

Persistent Absence = 
VAR __ISINSCOPE = ISINSCOPE ( Attendance[Year] )
VAR __PACore = CALCULATE(DISTINCTCOUNT(Attendance[UPN-SUID]),FILTER(
                VALUES('Attendance'[UPN-SUID]),
                            [Attendance Percentage YTD] <= 0.90))

RETURN

IF (
    __ISINSCOPE,
        __PACore,
        CALCULATE(__PACore,NOT('Attendance'[Year] IN {"Nursery", "Reception"}                     
)))

I then use the following to find the percentage:

Persistent Absence % = Divide([Persistent Absence YTD], DISTINCTCOUNT(Attendance[UPN-SUID]))

I then have multiple measures that give me breakdowns of the percentage such as:

Male Persistent Absence % YTD = 
Calculate([Persistent Absence % YTD], 'Student Database (New)'[Gender] IN {"Male"})

The problem is that I only want to filter the numerator of the second measure by the 3rd and not the denominator. Is there a way to make:

 

Persistent Absence % = Divide([Persistent Absence YTD], DISTINCTCOUNT(Attendance[UPN-SUID]))

 

the element in bold not filterable by the 'Student Database (New)' table?

 

The alternative is editing multiple measures rather than just one.

 

Thanks,

 

Stan

1 REPLY 1
v-shex-msft
Community Support
Community Support

hi @StanleyBlack ,

I'd like to suggest you take a look at following link to use all function to ignore specific filters:

Managing “all” functions in DAX: ALL, ALLSELECTED, ALLNOBLANKROW, ALLEXCEPT

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.