cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

adding a calculated column based on contents of two different columns

Good afternoon all.  

 

I have a table with columns named "status" and "Age".  I would like to have the calculated column return a value of "Late" if the status column = "Open" and the "Age" column is > 30.  I know how to do this in both Excel and Access, but Power BI solution eludes me.

 

All help is greatly appreciated.

 

Jim L

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Super User III
Super User III

Re: adding a calculated column based on contents of two different columns

So that would be something like the following:

 

= IF( table[Status] = "Open" && table[Age] > 30, "Late")

View solution in original post

Highlighted
Community Support
Community Support

Re: adding a calculated column based on contents of two different columns

@JimB-GA 

 

By the way, you may also add a custom column in Query Editor.

if [status] = "Open" and [Age] > 30 then "Late" else null
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Highlighted
Super User III
Super User III

Re: adding a calculated column based on contents of two different columns

So that would be something like the following:

 

= IF( table[Status] = "Open" && table[Age] > 30, "Late")

View solution in original post

Highlighted
Community Support
Community Support

Re: adding a calculated column based on contents of two different columns

@JimB-GA 

 

By the way, you may also add a custom column in Query Editor.

if [status] = "Open" and [Age] > 30 then "Late" else null
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
May 2020 Community Highlights

May 2020 Community Highlights

It’s time for another PBI Community recap!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Galleries

Galleries

Looking for inspiration on how to present your data? Need instructional videos? Check out our Galleries!

Top Solution Authors