We're giving away 30 tickets for FREE! Share your story, your vision, or your hustle and tell us why YOU deserve a ticket.
Apply nowWin a FREE 3 Day Ticket to FabCon Vienna. Apply now
Hello,
I have a column of tables like below:
I can expand the column to extract the values but that adds a duplicate line for each value - so I am using the below line in my power query to add a column that combines the text from a value in the tables.
Table.AddColumn(#Source, "Project/System", each Text.Combine(Table.Column[ProjectSystem], "Title"), ", "))
This works as expected and I am presented with a new column that combines the values as I like but I do have a few records where this throws an error because the table is empty.
How can I have the above line return null to the new column if the table value is empty?
Thanks,
Zach
Solved! Go to Solution.
@ZachRoberts - have you taken a look at https://docs.microsoft.com/en-us/power-query/handlingerrors ? e.g. try otherwise
Proud to be a Super User!
@ZachRoberts - have you taken a look at https://docs.microsoft.com/en-us/power-query/handlingerrors ? e.g. try otherwise
Proud to be a Super User!
Thanks! That was the ticket 🙂
changed my query to the below and it worked
Table.AddColumn(#Source, "Project/System", each try Text.Combine(Table.Column([ProjectSystem], "Title"),", ") otherwise null)
User | Count |
---|---|
61 | |
56 | |
50 | |
43 | |
33 |
User | Count |
---|---|
118 | |
81 | |
70 | |
47 | |
47 |