You can use the formula editor in the compare table, or write the SAQL itself.
Both ways, you are going to use the coalesce function:
However there are still certain situations to consider:
Can only one of the values be filled? If so, the above code would be sufficient.
If not, you have to decide if Code1__c or Code2__c should ...
1 Use a dataflow to rename the stages with a preceding number
just as @Ayub said.
2 Use a dataset XMD to rename Stages
AND there is Vote for this :https://success.salesforce.com/ideaView?id=0873A000000EAsWQAW