cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
StanleyBlack Frequent Visitor
Frequent Visitor

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
Community Support Team
Community Support Team

Re: Do not allow a measure element to be filtered

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 Sheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.



For learning resources/Release notes, please visit: | |

Helpful resources

Announcements
Back to School Contest

Back to School Contest

Engage and empower students with Power BI!

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Summit Australia 2019

Summit Australia 2019

Travel to Melbourne and network with thousands of peers!

Top Ideas
Users Online
Currently online: 116 members 1,821 guests
Please welcome our newest community members: