Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
I want to create a new column in my data, based off the value of an existing column. I did not want to use an if statement, because would have to use about 9 nested statements and that is soooooo messy. So after a little googling I found the Switch statement.
Thanks in advance for your assistance
Client Name Modified= SWITCH (PMO_Time[Project Number],
“2700002","Finance Non-Project",
"2700003","Finance Non-Project",
"2700004","Finance Non-Project",
"2700006","Finance Non-Project",
"2700007","Finance Non-Project",
"2700008","Finance Non-Project",
"2700011","Finance Non-Project",
"2700012","Finance Non-Project",
"2700999","Finance Non-Project",
PMO_Time[Client Name]
)
Solved! Go to Solution.
Maybe try trimming PMO_Time[Project Number], just in case there's a space or something in front/behind it. Maybe it needs to be padded with zeros or something else?
Maybe try trimming PMO_Time[Project Number], just in case there's a space or something in front/behind it. Maybe it needs to be padded with zeros or something else?
Thank you. That was it and easy to fix.. once you pointed me in the correct direction.
Is the data type of your project number field a number or text? If it's the former try getting rid of the "s around your project numbers
Thanks for your reply. The data type is text. Additionally, PowerBi does not return any errors when I save the statement.
User | Count |
---|---|
84 | |
77 | |
76 | |
43 | |
36 |
User | Count |
---|---|
109 | |
56 | |
52 | |
45 | |
43 |