Forum Discussion
MAC_127
Oct 13, 2023Copper Contributor
PowerQuery - Creating consolidation column referencing one of two columns based on third column
Hello! I'm trying to create a consolidation column where the value is either the row value of Column 1 or the row value of Column 2 based on the row value in Column 3. The data might look like ...
SergeiBaklan
Oct 13, 2023Diamond Contributor
Do we speak about Power Query or about DAX (data model). EARLIER() and EARLIEST() are in the latest. In your case (if we are in DAX) you don't need them since you are in the same row context. You have no filters, thus no multiple row contexts, thus no outer row contexts which EARLIER() could return.
In general these functions are outdated, you may use VAR to fix row context.
In your case you need nothing of above, simple IF works both in Power Query and DAX.