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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
geroagostini
Helper I
Helper I

Need to add values to a column ( or create a new one )

hi!

 I have a column like the given below and i need to add them a order numbers at the beginnin: 1.New , 2.Created , 3.Old , 4.Recent.

 How can i create a Custom column that does it? 

 

 Column A

    New

    Old

    Old

    New

    Created

    Recent

    Created

 

1 ACCEPTED SOLUTION
serpiva64
Super User
Super User

Hi, 

if that is your only problem you can solve it with a conditional Column

serpiva64_0-1674575073364.png

You can also do it step by step with replace if you don't want to create a new column

If this post isuseful to help you to solve your issue consider giving the post a thumbs up and accepting it as a solution

 

 

 

View solution in original post

3 REPLIES 3
serpiva64
Super User
Super User

Hi, 

if that is your only problem you can solve it with a conditional Column

serpiva64_0-1674575073364.png

You can also do it step by step with replace if you don't want to create a new column

If this post isuseful to help you to solve your issue consider giving the post a thumbs up and accepting it as a solution

 

 

 

FreemanZ
Super User
Super User

hi @geroagostini 

You may add a calculated column with  DAX code like

Order = 
SWITCH(
    [Column A],
    "New", 1,
    "Created", 2,
    "Old", 3,
    4
)
Idrissshatila
Super User
Super User

Hello @geroagostini ,

You could add a conditional column in power query , check this link for instructions https://learn.microsoft.com/en-us/power-query/add-conditional-column

 

If I answered your question, please mark my post as solution so it would appeare to others, Appreciate your Kudos 👍

 

Follow me on Linkedin



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.