Forum Discussion

smc1906's avatar
smc1906
Frequent Visitor
4 years ago
Solved

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!
  • 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.

2 Replies

  • 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.

    • smc1906's avatar
      smc1906
      Frequent Visitor

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