Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi,
After reading through several threads I got stuck and didnt manage to solve this on my own 😕 But hey, here's to a great community right! 🙂
I have three sets of columns, A, B and C.
What I want to achieve:
I want PBI to populate column D with the info coming from either A, B or C.
So in all simplicity;
If column A = blank and Column B is blank, then populate Column D with Column C.
If Column B = blank and Column C is blank, then populate Column D with Column A.
If Column C = blank and Column A is blank, then populate Column D with Column B.
With only two columns its not difficult at all, but three...well, I surrender 🙂
Any help appreciated!
Solved! Go to Solution.
Hi @tonijj ,
If you only have values in one of the columns try the following code:
Output = COALESCE ( Table[ColumnA], COALESCE ( Table[ColumnB], Table[Column C])
Be aware that the first value to be check will be the Column A then B then C so if you have two columns with values they will be pick up by that order.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @MFelix
Thanks! That seems to work!
Quick followup question; Why would I need to use Coalesce twice?
In the formula above its used as main DAX function, but then within the formula, after [ColumnA] again? Just wondering wether thats a typo or if Im missing something? Just asking so I learn how to use it myself next time 🙂
Hi @tonijj ,
It was a typo, I was copy pasting information and must have copied entire formula, then posted the image with the error and in the code. Correct formula is:
Output = COALESCE ( Table[ColumnA], Table[ColumnB], Table[Column C])
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @tonijj ,
If you only have values in one of the columns try the following code:
Output = COALESCE ( Table[ColumnA], COALESCE ( Table[ColumnB], Table[Column C])
Be aware that the first value to be check will be the Column A then B then C so if you have two columns with values they will be pick up by that order.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsMarch 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
126 | |
78 | |
78 | |
60 | |
51 |
User | Count |
---|---|
164 | |
84 | |
68 | |
68 | |
58 |