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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.