Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
hello,
i am trying to add a custom column where if value in column A is greater than 0 then column A value should appear, if not value from column B should appear, though if both column have null then null should appear in custom column. i tried to do this with custom and conditional column method but error appers in some rows in both method. please suggest.
A | B |
null | null |
null | null |
null | null |
0 | null |
null | null |
0 | null |
null | 0 |
null | 5.94 |
7.75 | null |
7.75 | null |
3.93 | null |
4.12 | null |
4.12 | null |
3.98 | null |
4.2 | null |
8.5 | null |
null | null |
null | null |
4.2 | null |
Solved! Go to Solution.
@rohitjmd Try this as a "Custom Column" in Power Query Editor
=if [A]=null or [A]<=0 then [B] else [A]
Proud to be a PBI Community Champion
What if the column headers change each day? my problem is very similar, i have a date column which then i pivot so the dates become the column headers and i am after a custom column that looks at the previous day and returns those values if greater then the day before else show 0....any help would be greatly appreciate!
@rohitjmd Try this as a "Custom Column" in Power Query Editor
=if [A]=null or [A]<=0 then [B] else [A]
Proud to be a PBI Community Champion
User | Count |
---|---|
76 | |
75 | |
46 | |
31 | |
28 |
User | Count |
---|---|
99 | |
91 | |
51 | |
49 | |
46 |