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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Coryanthony
Helper III
Helper III

Help with Calculated Column, Switch TRUE. PLEASE

Hello,

I have what i thought was a basic calculated column, but having issues that i can't explain or figure out. Please please help.

 
Threshold = SWITCH(TRUE(),
[Total Cash Claim] > 3000 && 'Cash Claims'[Employee Custom 11 - Name] = "Partner", "Partner",
[Total Cash Claim] > 1000 && 'Cash Claims'[Employee Custom 11 - Name] <> "Partner", "Employee", "NO")
 
Column description - If [Total Cash Claim] is > 3000 && [Employee Custom 11 - Name] = "Partner", then i want text to be "Partner"
                                   If [Total Cash Claim] is > 1000 && [Employee Custom 11 - Name] does not = "Partner", then i want text to                                         be "Employee", IF not, then "NO"
 
WHen i place this column in a table, it is not displaying the correct result, additionally, it is changing the [Total Cash Claim] results.
 
Please see Table A, i have the theshold column there but it changed the amount and also reporting "NO" rather than "Partner"
 
I cannot seem to figure this out. Please help. Thank you
Coryanthony_0-1695170377955.png

 

 
 
3 REPLIES 3
Coryanthony
Helper III
Helper III

@amitchandak 

I just watched you vidro and it was awesome. I should be able to make it with a measure.

But if i wanted the calculated column, what would be the best approach? 

amitchandak
Super User
Super User

@Coryanthony , The below will work only with [Total Cash Claim] is not a measure.

 

Threshold = SWITCH(TRUE(),
[Total Cash Claim] > 3000 && 'Cash Claims'[Employee Custom 11 - Name] = "Partner", "Partner",
[Total Cash Claim] > 1000 && 'Cash Claims'[Employee Custom 11 - Name] <> "Partner", "Employee", "NO")

 

If [Total Cash Claim] is measured then you need a measure and dynamic Segmentation

 measure

 

Threshold = SWITCH(TRUE(),
[Total Cash Claim] > 3000 && max('Cash Claims'[Employee Custom 11 - Name]) = "Partner", "Partner",
[Total Cash Claim] > 1000 &&max('Cash Claims'[Employee Custom 11 - Name])  <> "Partner", "Employee", "NO")

 

 

 

example

Customer Retention with Dynamic Segmentation, New/Lost/Retain Customer Count: https://youtu.be/EyL7KMw877Q

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi @amitchandak 

I did try eliminating the measure and while that did not change the amount, the logic was not accurate. I was not getting any "NO". If under the amounts i was still getting TRUE. Please see example below. 

I also want to count the amount of "Partner" and "Employee"; therefore, i was hoping to get this in a column.

 

Threshold = SWITCH(TRUE(),
SUM('Cash Claims'[Claimed Amount (rpt)]) > 3000 && 'Cash Claims'[Employee Custom 11 - Name] = "Partner", "Partner",
SUM('Cash Claims'[Claimed Amount (rpt)]) > 1000 && 'Cash Claims'[Employee Custom 11 - Name] <> "Partner", "Employee", "NO")
 
based on logic, highlighted should be "NO"
 
Coryanthony_0-1695186844981.png

 

 

I appreciate you so much. Thank you.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors