Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
The variable [Sub-sector?] in the table 'fact_countries' contains different job titles that need to be graded according to their perceived Risk into: "High Risk", "Medium " and "Low Risk". Everything else goes into " not specified".
Why is the below code setting all varibles to High Risk?
Risk =
SWITCH(TRUE(),
CONTAINS(fact_countries, fact_countries[Sub-sector?],"Derivative issuer")
|| CONTAINS(fact_countries, fact_countries[Sub-sector?],"Derivatives issuer")
|| CONTAINS(fact_countries, fact_countries[Sub-sector?],"Derivatives issuerOther")
,"High Risk",
CONTAINS(fact_countries, fact_countries[Sub-sector?],"Fund manager")
|| CONTAINS(fact_countries, fact_countries[Sub-sector?],"Fund managerBrokers / Custodians")
|| CONTAINS(fact_countries, fact_countries[Sub-sector?],"Fund managerBrokers / CustodiansDIMS provider")
,"Medium Risk",
CONTAINS(fact_countries, fact_countries[Sub-sector?],"Issuer of securities")
|| CONTAINS(fact_countries, fact_countries[Sub-sector?],"Other")
|| CONTAINS(fact_countries, fact_countries[Sub-sector?],"Trustee corporation / Licensed supervisor")
,"Low Risk",
"Not specified"
)
Solved! Go to Solution.
I was wrong: IT WORKS. I leave it here for reference.
I was wrong: IT WORKS. I leave it here for reference.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 11 | |
| 9 | |
| 9 | |
| 6 | |
| 5 |
| User | Count |
|---|---|
| 27 | |
| 22 | |
| 19 | |
| 17 | |
| 11 |