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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
LMBarnes
New Member

I am trying to create a DAX for complex case

Please bear with me, this is the first time of my life I've used an online forum, and I am new to Power BI for only a few weeks!
I have a column that my external query provides amounts using weighting values. This column is at the lowest level of
data grain in my fact table, because it uses weighting values at that grain to create the amounts.
Call this lowest level in my Fact data as 'AttributeTest'.
Call the higher level in my Dimension as 'Project'.
Now, I've created a measure for the level 'Project' that sums those weighted amounts of 'AttributeTest' up to Project, and then
calc's a percentage for Project from those sums. This measure is filter-aware, and I've proven that it calc's correctly when a I filter on 'Projects' in my Viz.
My problem:
Now I need to create a DAX case (SWITCH) that will compare this measure Project-level percentage from my measure to thresholds in a Project-level Dimension table
(they are also percentages) so that I can determine if the Project-level percentage falls;
>= PASS threshold (a 'PASS' condition)
<  PASS threshold AND (&&) > FAIL threshold (a 'WARN' condition)
<  FAIL threshold (a 'FAIL' condition)
Else will be 'NONE' condition.
 I've been at this for two days and just cannot nail it
2 REPLIES 2
harshnathani
Community Champion
Community Champion

Hi @LMBarnes 

 

Try these measures

 

Sw= 

 

SWITCH(
TRUE(),
[ProjectPercentage] >= [PassThreshold] , "Pass",

[ProjectPercentage] < [PassThreshold] && [ProjectPercentage] >=[FailThreshold] ,"WARN",

"FAIL"
)

 

It is very difficult to understand unless you share sample data and expected output,

 

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

 

 

 

Regards,

Harsh Nathani

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.