The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I would like to add a new column that gives a number corresponding to a word that appears in a different column.
If word APPROVED is in column 1, then "1" is shown in the new column
If word NOT APPROVED is in column 1, then "2" in the new column
If word IN PROGRESS is in column 1, then "3" in the new column
Thanks!
Solved! Go to Solution.
Did you try to add a new column or a measure?
test this for adding a new column with DAX:
New Column =
SWITCH([column 1],
"APPROVED ",1,
"NOT APPROVED",2,
"IN PROGRESS",3
)
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Hi @Anonymous
Try this to add a new column:
New Column =
SWITCH(EARLIER([column 1]),
"APPROVED ",1,
"NOT APPROVED",2,
"IN PROGRESS",3
)
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn | Twitter | Blog | YouTube
@VahidDM That doesn't seem to work. It doesn't allow me to enter column 1 after EARLIER
Did you try to add a new column or a measure?
test this for adding a new column with DAX:
New Column =
SWITCH([column 1],
"APPROVED ",1,
"NOT APPROVED",2,
"IN PROGRESS",3
)
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
79 | |
72 | |
46 | |
39 |
User | Count |
---|---|
135 | |
108 | |
69 | |
64 | |
56 |