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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Ajaikumar
Regular Visitor

DAX is not identifying the date fields

I'm trying to get the number of days between two dates. For that, I tried to use the DATEDIFF function but the date fields are not showing up in IntelliSense and if I try to enter it manually it shows an error that is in the figure below:

Screenshot 2023-01-08 231842.png

 

Please let me know what is wrong with this expression. Thanks in advance.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Ajaikumar ,

As checked your screenshot, what you are trying to create is a measure. That is the cause of problem. This errror can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result. You can review the following blog for more details.

DAX error messages in Power BI

yingyinr_0-1673331764653.png

And the solution is that you can create a calculated column as below to replace this measure...

 

R value = DATEDIFF ( calendar[Date], TODAY (), DAY )

 

yingyinr_1-1673332092675.png

In addition, you can refer the following blog to get the difference between two dates.

Power bi Date Difference

yingyinr_1-1673332705332.png

Best Regards

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @Ajaikumar ,

As checked your screenshot, what you are trying to create is a measure. That is the cause of problem. This errror can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result. You can review the following blog for more details.

DAX error messages in Power BI

yingyinr_0-1673331764653.png

And the solution is that you can create a calculated column as below to replace this measure...

 

R value = DATEDIFF ( calendar[Date], TODAY (), DAY )

 

yingyinr_1-1673332092675.png

In addition, you can refer the following blog to get the difference between two dates.

Power bi Date Difference

yingyinr_1-1673332705332.png

Best Regards

Thank you for the solution @Anonymous 

tamerj1
Super User
Super User

Hi @Ajaikumar 

perhaps you're trying to create a new Calculated Column but in fact you created a Measure instead

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.