Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
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:
User | Count |
---|---|
134 | |
74 | |
72 | |
58 | |
54 |
User | Count |
---|---|
194 | |
95 | |
63 | |
63 | |
51 |