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

 

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

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.