- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Month/Year of Today ()
Hi,
There is error for the below Column, please advise if MONTH (TODAY()) and YEAR (TODAY()) can't be used here.
Error message:
DAX comparison operations do not support comparing values of type Text with values of type Integer.
Consider using the VALUE or FORMAT function to convert one of the values.
Flag = IF(Table[Due_Date]=BLANK(),1,
IF(OR(AND(Table[Due_Date].[Month]=MONTH(TODAY()),Table[Due_Date].[Year]=YEAR(TODAY())),
TODAY()<Table[Due_Date]),
0,1))
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

@PBI_newuser , Try like
Flag = IF( isblank(Table[Due_Date]),1,
IF(OR(AND( month(Table[Due_Date])=MONTH(TODAY()),year(Table[Due_Date])=YEAR(TODAY())),
TODAY()<Table[Due_Date]),
0,1))
Hope due_date is identified as date
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Table[Due_Date].[Month] will return Month Name and MONTH(TODAY()) will return the Month Number and they cannot be compared.
Therefore do a comparison between MONTH(Table[Due_Date]) and MONTH(TODAY()) because they both would return Numbers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Table[Due_Date].[Month] will return Month Name and MONTH(TODAY()) will return the Month Number and they cannot be compared.
Therefore do a comparison between MONTH(Table[Due_Date]) and MONTH(TODAY()) because they both would return Numbers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

@PBI_newuser , Try like
Flag = IF( isblank(Table[Due_Date]),1,
IF(OR(AND( month(Table[Due_Date])=MONTH(TODAY()),year(Table[Due_Date])=YEAR(TODAY())),
TODAY()<Table[Due_Date]),
0,1))
Hope due_date is identified as date

Helpful resources
Subject | Author | Posted | |
---|---|---|---|
02-10-2025 08:29 AM | |||
08-30-2022 01:14 AM | |||
07-16-2024 04:41 AM | |||
09-06-2024 01:26 AM | |||
01-08-2025 12:43 AM |
User | Count |
---|---|
106 | |
87 | |
80 | |
54 | |
46 |