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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
dataanalyst2023
Frequent Visitor

Need to use the OR function or similar

Hello All, 

 

A few days back I was helped with the following DAX to obtain "Per this questions the value is Rule, Skill or Knowledge) 

SWITCH(
    TRUE(),
    'Table'[Answer 1] = "No" && 'Table'[Answer 2] = "Yes" , "Skill-Based Mode",
    'Table'[Answer 3] = "Yes", "Skill-Based Mode",
    'Table'[Answer 4] = "No" && 'Table'[Answer 5] = "Yes", "Skill-Based Mode"
    ) 


It did work, but my questions have changed a little since. For example some of the questions OR is required 


Question 13:  Does the Observed Personnel Perform this task more than 10 times a day?

  • If Yes = Skill-Based Performance Mode
  • If No & Question 11, 12, or 15 are NO OR Question 14 is YES = Knowledge-Based Performance Mode
  • If No & Question 11, 12, or 15 are YES OR Question 14 is NO = Rule-Based Performance Mode

     


    Question 16:  Did the Observed Personnel demonstrate the proper use of PPE required for this task?

    • If Yes = Rule-Based Performance Mode
    • If No and Question 13 is Yes = Skill-Based Performance Mode
    • If No and Question 13 or 15 are NO = Knowledge-Based Performance Mode

Any help is appreciated. 

Thank you!


 

3 REPLIES 3
dataanalyst2023
Frequent Visitor

Thank you! Below is what I added. Still seems like its mixing up Rule-Based, Skill-Based.. Did I not apply this correctly

 

dataanalyst2023_0-1697467418236.pngdataanalyst2023_1-1697467437625.pngdataanalyst2023_2-1697467449548.png

 

Anonymous
Not applicable

Hi @dataanalyst2023 ,

Base on your decription, it seems that you are trying to categorize the different performance mode base on multiple conditions. Could you please provide some raw data in the table 'Flexport POP Program' (exclude sensitive data) with Text format and your expected result with backend logic and special examples? It would be helpful to find out the solution. You can refer the following links to share the required info:

How to provide sample data in the Power BI Forum

 

It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

jmlesteves
Frequent Visitor

Hi,

As the AND (&&) operator, there is also the OR (||) operator.
Use it adequately in the SWITCH branches, using parenthesis in the logical expressions to ensure that the mixed AND(&&) and OR (||) conditions are correctly applied.

Regards

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.