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
andrewb95
Helper II
Helper II

If & Today operators

I am attempting to run a query so a new column will populate as TRUE if two statuses from one column are correct and the date is before the current date. 

 

ie. I have: 
A database where each contact can match one of the following items and has association with a date. 


Column A:
Item 1 | Item 2 | Item 3 | Item 4 | Item 5

 

Column B:

A list of dates 

 

I want to say IF Column A = Item 1 or Item 2 AND Column B date is before TODAY. Then Equal to True, if not equal to false. 

1 ACCEPTED SOLUTION

This worked however not all the parenthesis were needed:

IF(Table1[COLUMNA] = "ITEM-1" || [Direction] = "ITEM-2" || && Table1[COLUMNB] < TODAY() ,TRUE(), FALSE())

 

Thanks!

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@andrewb95 , Are these columns or table. If tables what is relation. Can share some sample data and explain with example

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

It was all from columns within the same table, many thanks for attempting to support. 

Fowmy
Super User
Super User

@andrewb95 

Try below code as  new column

STATUS = 
IF((Table1[COLUMNA] = "ITEM-1" || [Direction] = "ITEM-2" || )&& Table1[COLUMNB] < TODAY() ,TRUE(), FALSE())

________________________

Did I answer your question? Mark this post as a solution, this will help others!.

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube, LinkedIn 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

This worked however not all the parenthesis were needed:

IF(Table1[COLUMNA] = "ITEM-1" || [Direction] = "ITEM-2" || && Table1[COLUMNB] < TODAY() ,TRUE(), FALSE())

 

Thanks!

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!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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.