Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare 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:
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
113 | |
96 | |
91 | |
82 | |
69 |
User | Count |
---|---|
159 | |
125 | |
116 | |
111 | |
95 |