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 moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
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.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
94 | |
84 | |
84 | |
73 | |
49 |
User | Count |
---|---|
143 | |
132 | |
110 | |
64 | |
55 |