Hello,
I have a large data set that I thought I'd analyze via Power Query. I added an additional (conditional) column. No problem. I attempted to add a 2nd conditional column which was based on the first conditional column. PQ didn't offer me that column to choose in writing the IF test for that column.
I then Googled that issue in thinking there would be an easy fix to that problem. What I found was a couple of DAX solutions which I would need to somehow add to my file. That was a bit above my comfort level for what I thought was an easy problem.
So, my question is whether there is an easy workaround to adding an additional column based on data that was not in the original data set. Essentially, I have several conditional columns in which I want to base the IF test on the value of the prior conditional column. I can understand that the data has to be "loaded" for it to be picked, but this limitation inhibits my ability to "select columns at will" in order to perform calculations. Does anyone know of an easy workaround?
Thanks,
Scotty81
Can you share a file demonstrating the issue? Because when you add a column within PQ there's noting preventing you from using that custom column in a next step that adds another custom column.
Hi Riny,
I didn't attach a file, but what I mean is let's say I have some data about projects. The raw data might contain columns on cost, due date, and timing. This is a silly example, but I might add a custom conditional column that says if the timing is during 2023, the the new column's output would be 2023 Project. Then, what I would want to do is add another conditional column that says if the new column says "2023 Project", then I would have perhaps another IF statement testing the due date.
I realize that I can add the 2 additional columns, but that for the 2nd conditional column, I can't use the output of the first conditional column as a test for the 2nd one.
I also know the example I provided is a silly one, but it's just that I have a lot of IF tests to perform on some raw data and I wanted to perform those tests sequentially in new conditional columns.
Since my posting, i realized that I can put all those IF tests in one custom column, but I liked the idea of putting them in separate columns for clarity and also to filter on the results of those separate columns if I needed to.
Hope that clarifies things...
Not really, sorry. Or perhaps I'm just slow in understanding. I attached a file with an example as 'silly' as yours. Haha!
See if it makes sense. If not and if you still would like to add consecutive custom columns, come back here.
Riny,
Thanks! I see that your solution certainly worked! I'll modify it for my specific file. Not sure if there was a subtle difference, but I'm glad it can be done. Most likely is user error. 🙂
Regards,
Scotty81
Glad it worked. Don't hesitate to come back here in case you get stuck!