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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
claret_mug
Frequent Visitor

using OR in a measure

Hello

 

I have the following measure that calculates the number of students who have made progress. For the 'Entry Grade Mapping' I want to include students if they are "BTEC only" or " Mixed BTEC and A-Levels" but I am not sure how to write this. Can anyone help? Thank you very much

 

BTEC + Progression all years = CALCULATE ([Total students], 'Table1' [Collaborative Provision Indicator]="Non-collaborative", 'Table1' [Course length 1 year or less]="No", 'Table1' [Program level]="No UG ", 'Table1' [Course Mode (FT / PT)] =" Full Time ", 'Table1' [Entry Route] =" UCAS / GTTR ", 'Table1' [EU Overseas Home Residence] =" Home ", Table1 [Entry Qualification Mapping] ="BTEC Only" )
1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

@claret_mug Maybe:

BTEC + Progression all years =
CALCULATE (
    [Total students],
    'Table1'[Collaborative Provision Indicator] = "Non-collaborative",
    'Table1'[Course length 1 year or less] = "No",
    'Table1'[Program level] = "No UG ",
    'Table1'[Course Mode (FT / PT)] = " Full Time ",
    'Table1'[Entry Route] = " UCAS / GTTR ",
    'Table1'[EU Overseas Home Residence] = " Home ",
    OR(Table1[Entry Qualification Mapping] = "BTEC Only", Table1[Entry Qualification Mapping] = "Mixed BTEC and A-Levels")
)


If not, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

4 REPLIES 4
Fowmy
Super User
Super User

@claret_mug 

Try:

BTEC + Progression all years = 
CALCULATE (
    [Total students], 
    'Table1' [Collaborative Provision Indicator]="Non-collaborative", 
    'Table1' [Course length 1 year or less]="No", 
    'Table1' [Program level]="No UG ", 
    'Table1' [Course Mode (FT / PT)] =" Full Time ", 
    'Table1' [Entry Route] =" UCAS / GTTR ", 
    'Table1' [EU Overseas Home Residence] =" Home ", 
     Table1 [Entry Qualification Mapping] ="BTEC only" || AND([Entry Qualification Mapping] ="Mixed BTEC","A-Levels") 
)   

________________________

If my answer was helpful, please consider Accept it as the solution to help the other members find it

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube  LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Greg_Deckler
Super User
Super User

@claret_mug Maybe:

BTEC + Progression all years =
CALCULATE (
    [Total students],
    'Table1'[Collaborative Provision Indicator] = "Non-collaborative",
    'Table1'[Course length 1 year or less] = "No",
    'Table1'[Program level] = "No UG ",
    'Table1'[Course Mode (FT / PT)] = " Full Time ",
    'Table1'[Entry Route] = " UCAS / GTTR ",
    'Table1'[EU Overseas Home Residence] = " Home ",
    OR(Table1[Entry Qualification Mapping] = "BTEC Only", Table1[Entry Qualification Mapping] = "Mixed BTEC and A-Levels")
)


If not, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler thank you so much, this has worked. I was putting the 'OR' in the wrong place when I attempted it. Thanks for saving me from an afternoon of pain 🙂 

@claret_mug - No problem. @Fowmy 's solution should work as well. Double pipe ( || ) is an OR operator and probably works like you were expecting OR function to work!



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.