Forum Discussion
Rex-Delson
Jan 25, 2023Copper Contributor
Power Query formula
Question 1: In Column H is a simple formula to show the variance between columns G and F. How can I show a "null" in H when there is nothing in G? Question 2: Column F has a simple formula that ...
SergeiBaklan
Jan 26, 2023Diamond Contributor
Why don't you do all such transformations in Power Query directly?
Rex-Delson
Jan 26, 2023Copper Contributor
good question if i knew how to do question #1, i would.
- SergeiBaklanJan 26, 2023Diamond Contributor
For such sample:
- stay on Add Column tab
- select Estimate column, keep Ctrl key, select Aprox column, release Ctrl
- under Standard in drop-down select Subtract
New column will be generated. If nothing in any of source columns (aka null) it also returns null. Returned to the grid table will have empty cell here.
If you prefer some text you may modify generated formula in formula bar with
, each if [Estimated] = null then "nothing is here" else [Estimated] - [Approx] ,
If Approx could be empty before subtraction step select column and replace value, null on 0.