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
kangkopi15
Helper I
Helper I

New simplify new column from another column

Dear Experts, I need your help again, I have this table called Grade with all the details, and I want to create a new column called Grade Final with general details, by referring to the previous column.
How can I do this in DAX, essentially I want to generalize the Grade number in the Grade Final column

GradeGrade Final
Senior Manager (3.3)Grade 3
Manager (3.1 - 3.2)Grade 3
Senior Associate (2.1)Grade 2
Director (4)Grade 4
Program Manager (2.3)Grade 2
Deputy Program Manager (2.1)Grade 2
  



1 ACCEPTED SOLUTION
PhilipTreacy
Super User
Super User

Hi @kangkopi15 

 

Your example data is different to your actual data in that the actual data has some grades that do not contain ().

 

try this instead

 

Grade Final = 

VAR _Bracket = SEARCH("(", [Grade], ,0)

RETURN

IF (_Bracket > 0 , "Grade " & MID([Grade], _Bracket +1,1), "Grade " & MID([Grade], LEN([Grade]),1))

 

regards

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


View solution in original post

4 REPLIES 4
PhilipTreacy
Super User
Super User

Hi @kangkopi15 

 

Your example data is different to your actual data in that the actual data has some grades that do not contain ().

 

try this instead

 

Grade Final = 

VAR _Bracket = SEARCH("(", [Grade], ,0)

RETURN

IF (_Bracket > 0 , "Grade " & MID([Grade], _Bracket +1,1), "Grade " & MID([Grade], LEN([Grade]),1))

 

regards

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


This is working, thank you @PhilipTreacy 

PhilipTreacy
Super User
Super User

Hi @kangkopi15 

 

Create the new column with this

 

Grade Final = "Grade " & MID([Grade], FIND("(", [Grade])+1,1)

 

Regards

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Hi @PhilipTreacy I tried to use the formula in the actual table, but unfortunately it doesn't work

kangkopi15_0-1711095968042.png

I suppose to have Band 3, Band 3, Band 2 and so on under Band column

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.