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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Improve Existing Dax via Calculated Column

Hi All,

 

I have a dataset similar to the below.

 

UP Activity/Skill TypeCalculated Column
_Day Work
_Day Work
Unit RateUnit Rate
Non BillableUnit Rate
Non-Billable ZeroUnit Rate
OverheadUnit Rate

I have a existing calculated column that searchs a column and if a "_" is found creates a row as "Day Work" and if not true "Unit Rate".

 

Calculated Column = IF(
    ISERROR(
        SEARCH("_", Employees[UP Activity/Skill Type])
    ),
    "Unit Rate",
    "Day Work")

 

I want to extend the DAX to say the following

 

If "_" is found = "Day Work"

If "Unit Rate" is found = "Unit Rate"

If anything else is found = "Non Billable"

 

Any ideas on how I can achieve this?

 

Many thanks 

1 ACCEPTED SOLUTION
Samarth_18
Community Champion
Community Champion

Hi @Anonymous ,

 

Try this:-

Column = SWITCH(TRUE(),
CONTAINSSTRING('Table (2)'[UP Activity/Skill Type],"_"),"Day Work",
CONTAINSSTRING('Table (2)'[UP Activity/Skill Type],"Unit Rate"),"Unit Rate",
"Non Billable")

 

Output:-

Samarth_18_0-1642148986279.png

 

Thanks,

Samarth

 

 

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

View solution in original post

1 REPLY 1
Samarth_18
Community Champion
Community Champion

Hi @Anonymous ,

 

Try this:-

Column = SWITCH(TRUE(),
CONTAINSSTRING('Table (2)'[UP Activity/Skill Type],"_"),"Day Work",
CONTAINSSTRING('Table (2)'[UP Activity/Skill Type],"Unit Rate"),"Unit Rate",
"Non Billable")

 

Output:-

Samarth_18_0-1642148986279.png

 

Thanks,

Samarth

 

 

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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