Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hello to everybody, I don't get it. I don't know why. Maybe to long working days.
It is a easy problem but I am lost. I would like to check the results for the column "Bedarfsmenge" to column "Bedarfsmenge.4".
If column Bedarfsmenge is null then take value of Bedarsfmenge.1, if this column is empty take Bedarfsmenge.2 and so on.
This is my code:
"Benutzerdefiniert", each if [Bedarfsmenge] = null then [Bedarfsmenge.1] else if [Bedarfsmenge.1] = null then [Bedarfsmenge.2] else if [Bedarfsmenge.2] = null then [Bedarfsmenge.3] else if [Bedarfsmenge.3] = null then [Bedarfsmenge.4] else [Bedarfsmenge])
But result is not as wished the value of column "Bedarsmenge.2". It is null. What is wrong?
Hi @Anonymous ,
As I look at your picture, the data type has not been selected in the columns. 
First I would fix that.
Next if the value = "null" use that in your formula.  If the value = 0 then use that in your formula.
Finally it is easier to write a SWITCH(TRUE()).
So it might look like this:
SWITCH(TRUE(),
Column1<>0,
Column2<>0,
Column3<>0
)
This formula uses whichever value is true that it comes to first.  So, if Column1 <> 0 is true, it will use that value and if not it will continue checking subsequent values.
Hope this helps.
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel
Proud to be a Super User!
Hello Alien, I didn't get it. I'm lost with this information, sorry for that. What I have to change in my formula?
@Anonymous , the code in your message <> code in your picture. Replace zeros (0) with null in the formula in PQ (your picture) and see how it works. You are expecting that null is equal to 0. It doesn't.
Ok, now I got it. Sorry for that missunterstanding with the picture and the code.
I took a wrong screenshot. I tried "null" as well as 0. With no success.
Lost.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.