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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
smc1906
Frequent Visitor

Two different scenarios in same Measure

Hi all

 

I currently have a measure (below) that counts the number of students transferring to a campus based on a number of filters. What I am looking to do (if possible) is to include a completely different filter, which is if the conditions of the first 4 filters are not met, there is another option which is (Iberia_Students[Re-enrolment]="Internal Transfer". This filter is completely independent of the first 4, however, so would essentially need to ignore them. The reason for this is the campuses having different ways of recording transfers, and I'd like them all to appear in the same column on the matrix.

 

Is there a way I can do that?

 

22/23 Sep Transfers = CALCULATE(COUNT('Iberia_Students'[txtSchoolID]),
USERELATIONSHIP(Iberia_Students[Campus], Iberia_Schools[SchoolCampusCode]),
USERELATIONSHIP(Iberia_Students[intEnrolmentNCYear]Iberia_Grades[GradeCode]),
FILTER('Iberia_Students',[intEnrolmentSchoolYear]=2022
&& 'Iberia_Students'[txtEnrolmentDate].[MonthNo]=9
&& 'Iberia_Students'[txtOfferType]="Transfer In"
&& 'Iberia_Students'[txtAdmissionStatus]="Accepted"))
 
Thank you!
1 ACCEPTED SOLUTION
johnt75
Super User
Super User

There's a couple of ways to accomplish this. The cleanest way may be to create separate measures to count the students using the separate filter conditions then combine them into a third measure, by simple addition, which you use on a visual.

Alternatively, you could wrap your existing filter conditions inside parentheses and add an or condition with your internal transfer filter.

View solution in original post

2 REPLIES 2
johnt75
Super User
Super User

There's a couple of ways to accomplish this. The cleanest way may be to create separate measures to count the students using the separate filter conditions then combine them into a third measure, by simple addition, which you use on a visual.

Alternatively, you could wrap your existing filter conditions inside parentheses and add an or condition with your internal transfer filter.

Thank you very much! The two separate measures, combined with a third, worked perfectly!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors