Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Hello,
this is my my custom column in a table:
IF [BB1_SV_faktor] is null then [BB1_SV] ELSE Value.Multiply([BB1_SV_faktor],[BB1_SV])
But I have data too where the column "BB1_SV_faktor" doesn't exists. So I want to check first if the column exists, and then make the calculation. Otherwise I want to only have the values of the column "BB1_SV" in the custom column.
I tried this out but it still tries to find "BB1_SV_faktor":
IF Table.HasColumns([BB1_SV_faktor]) then (IF [BB1_SV_faktor] is null then [BB1_SV] else Value.Multiply([BB1_SV_faktor],[BB1_SV])) else [BB1_SV]
Thanks in advance!
Hi @Clout ,
Could you please share some sample data and the expected result to have a clear understanding of your question? I can do some tests for you.
You can save your files in some cloud sharing platforms and share the link here.
How to provide sample data in the Power BI Forum - Microsoft Power BI Community
Best Regards,
Yuna
Can you try checking if it doesnt exist by adding not in front of the function and swifting the following if formula:
e.g.
IF not Table.HasColumns([BB1_SV_faktor])
Tank you for your comment @themistoklis
I tried it out with this command:
IF NOT Table.HasColumns([BB1_SV_faktor]) then [BB1_SV] else Value.Multiply([BB1_SV], 1)
So even when I don't try to multiplicate the values with "BB1_SV_faktor", Power Query tries to find the column "BB1_SV_faktor" when its named in the command.
Edit: Is it maybe possible with DAX instead to do the calculation in "M" when its not possible there?
I know this is an old thread, but just in case someone has the same question: the syntax is incorrect and should be as follows:
IF NOT Table.HasColumns(PreviousStepName,{"BB1_SV_faktor"}) then [BB1_SV] else Value.Multiply([BB1_SV], 1)
Did it work with DAX instead of M query?
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 79 | |
| 38 | |
| 31 | |
| 27 | |
| 27 |