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
zraopingm
Helper III
Helper III

Text and Integer date comparison for current month

Hello,  trying to get current month sum:

I tried to change month to date type, it does not allow me. 

I also tried to change year data type as text, same as month, it does not work either. 

Image 2 works, but then I will have to change the month NO for every month. 

thank you Zoey

Image 1:

zraopingm_0-1724689656243.png

 

image 2:

zraopingm_1-1724689817818.png

 

 

1 ACCEPTED SOLUTION
jgeddes
Super User
Super User

MONTH() returns a number. 
If your Date[Month] column is the column name then that is the source of the error. 
If you have a Date[Month No] column that returns a number then

Calculate('TASK MEASURE'[TASKS_APPROVED], 'Date'[Year] = YEAR(TODAY()), 'Date'[Month No] = MONTH(TODAY()))

should work.




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

2 REPLIES 2
jgeddes
Super User
Super User

MONTH() returns a number. 
If your Date[Month] column is the column name then that is the source of the error. 
If you have a Date[Month No] column that returns a number then

Calculate('TASK MEASURE'[TASKS_APPROVED], 'Date'[Year] = YEAR(TODAY()), 'Date'[Month No] = MONTH(TODAY()))

should work.




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Yes!! thank you 

Zoey

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!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.