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
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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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

Top Kudoed Authors