cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

Community Blog

Community Blog

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

Upcoming Events

Upcoming Events

Wondering what events you could join or have an event to promote yourself? Check out our Upcoming Events.

Top Solution Authors
Top Kudoed Authors