Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
DevonVanDam
Helper I
Helper I

Formula for calculated column in Power Query

Hello guys,

 

Can someone please help me translate these formulas from Excel, to make them suitable for Power Query's calculated column.

 

= IF ([Clearing document]="";"Open";"Closed")

= IF ([Clearing document]=[Document number];"Payment";"Invoice")

 

Thanks,

Devon

1 ACCEPTED SOLUTION
BA_Pete
Super User
Super User

Hi @DevonVanDam ,

 

Power query code as follows:

 

 

if [Clearing Document] = null or [Clearing Document] = "" then "Open" else "Closed"
if [Clearing Document] = [Document number] then "Payment" else "Invoice"

 

 

In Power Query, go to Add Column tab, then Custom Column and paste each of these lines in.

 

Pete

 



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@DevonVanDam , In Dax

new column = IF (isbalnk([Clearing document]) || [Clearing document]=""  ,"Open","Closed")

new column = IF ([Clearing document]=[Document number],"Payment","Invoice")

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
BA_Pete
Super User
Super User

Hi @DevonVanDam ,

 

Power query code as follows:

 

 

if [Clearing Document] = null or [Clearing Document] = "" then "Open" else "Closed"
if [Clearing Document] = [Document number] then "Payment" else "Invoice"

 

 

In Power Query, go to Add Column tab, then Custom Column and paste each of these lines in.

 

Pete

 



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.