Hi,
I am struggling with a Power Query element in Excel 2013.
Basically, I am trying to import a set of data (let's call it data set 1) from another Excel file, clean it up by replacing a space and a dash in the ID column (formatted as "010180-1210"), change the column names from "id" and "name" to "ID" and "Name", and change the number formatting of "ID" column, before before appending it into another query (from another data set, say data set 2).
The structure, column names (except for "ID" and "Name") and formatting of the two sets of data are completely different, but the issue is that while data set 2 will always contain data, data set 1 might not always do.
In the cases where data set 1 does not contain data, the query succeeds with removing columns because of the "MissingField.Ignore" argument, but fails in replacing values and changing number formatting.
So, I am looking for a similar argument (or other solution) that allows me to basically append nothing if data set 1 is empty, but ensures that the query does not fail (since the appended query fails in that event too).
I have included the M code below (I know it could be a lot cleaner but bear with me). Thanks in advance.
Bookmarks