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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Syndicate_Admin
Administrator
Administrator

CREATE TEXT CATEGORIES FOR THE DATE FIELD

HELLO, I AM NEW TO POWER BI AND I AM SLOWLY LEARNING, I HAVE A SMALL PROBLEM

I HAVE A DATE FIELD, AND I NEED TO CREATE A NEW FIELD THAT CATEGORIZES THAT DATE FIELD FROM TODAY IN ADELTANTE WITH "WITHIN DEADLINE" AND FROM YESTERDAY BACKWARDS WITH "EXPIRED"

CAN ANYONE HELP ME?

1 ACCEPTED SOLUTION
VahidDM
Super User
Super User

Hi @Syndicate_Admin  @avaldiviezo 

 

You can add a new column to your table with this DAX expression:


DATA CATEGORIZES = 
Var _Today = TODAY()
Var _Date = Table[Your Date Column Name]
Return
IF(_Date<_Today,"EXPIRED","WITHIN DEADLINE")

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 



 

View solution in original post

2 REPLIES 2
Syndicate_Admin
Administrator
Administrator

thanks, it was the right solution,

VahidDM
Super User
Super User

Hi @Syndicate_Admin  @avaldiviezo 

 

You can add a new column to your table with this DAX expression:


DATA CATEGORIZES = 
Var _Today = TODAY()
Var _Date = Table[Your Date Column Name]
Return
IF(_Date<_Today,"EXPIRED","WITHIN DEADLINE")

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 



 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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