Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreShape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.
Hi,
I need to put a formula in both m and dax language that if a field starts with * I should create a column with "open", if it doesn't start with * I should have "closed", how can I do?
Thanks
field | column to create |
*abcd | open |
abcd | closed |
Solved! Go to Solution.
Hi,
in power query you can create a custom column with the formula:
if Text.StartsWith([Column1],"*") then "Open" else "Closed"
full m code:
#"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each if Text.StartsWith([Column1],"*") then "Open" else "Closed")
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍
Hi,
in power query you can create a custom column with the formula:
if Text.StartsWith([Column1],"*") then "Open" else "Closed"
full m code:
#"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each if Text.StartsWith([Column1],"*") then "Open" else "Closed")
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍
thanks!
Additionally in DAX calculated column:
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
User | Count |
---|---|
94 | |
90 | |
83 | |
76 | |
49 |
User | Count |
---|---|
145 | |
140 | |
109 | |
68 | |
55 |