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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Getting Today Stats, from day month and year

Dear Team

 

Need ur help to define my date

TodayDate.png

Logic = if Date of Column DATE is the same with DAY of Today , Month of Today and Year of Today THEN remark TODAY else NOTTODAY

 

Note : today is June 2 2020

 

Thanks any help and respond

 

Regards

Syaiful

1 ACCEPTED SOLUTION
Anonymous
Not applicable
5 REPLIES 5
dax
Community Support
Community Support

Hi @Anonymous , 

I think your logic "Logic = if Date of Column DATE is the same with DAY of Today , Month of Today and Year of Today THEN remark TODAY else NOTTODAY" is to compare date with today, right?

If your date column is not date type, you could try to change it to date like below

733.PNG

Then try below calculated column expression

Column = if('Table (3)'[DATE - Copy]=TODAY(), "Today", "NotToday")

 If you Date type is text, you could try to use below expression.

Column 2 = if(FORMAT(TODAY(), "dd-MMM-yy")='Table (3)'[DATE], "Today", "NotToday")

734.PNG

Best Regards,
Zoe Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Anonymous
Not applicable

Thanks anyway for ur idea ..
for not date type of data .

actually my data was a date type , im trying ur 1st idea, it show the result  but all return to Not Today , there is no "TODAY"

 

 

Anonymous
Not applicable

amitchandak
Super User
Super User

@Anonymous ,

New column = if(Table[Date]=today(), "Today", "Not Today")

Also

You have year(date[Date]) Or Year(Today()) , similarly you have month() and day() function

Anonymous
Not applicable

Thanks @amitchandak for ur respond

i tried ur 1st advice , failed , only show comment after 1st condition (mean else )

 

i dun really know much bout DAX, thats why im asking how to build 3 condition for IF

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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