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
Meet the 2020 Season 2 Power BI Super Users!

Meet the 2020 Season 2 Power BI Super Users!

Find out who's part of the program this season, and welcome the new Super Users.

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!

July 2020 Community Highlights

July 2020 Community Highlights

Learn about the exciting things that happened in July.

Featured Data Story of The Month

Featured Data Story of The Month

All Data Stories Gallery contributions are reviewed for each month. We select a contribution and feature the community member the following month.

Power BI Dev Camp - Developing with .NET Core

Power BI Dev Camp - Developing with .NET Core

Learn how to develop custom web applications for Power BI using .NET Core 3.1 and .NET 5.

Top Solution Authors
Top Kudoed Authors