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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
georgec96
Helper II
Helper II

CALCULATE with Dates filter

Hi guys would be great if someone could help me I'm trying to count every row where due_date <= today() and entry_date <TODAY() - 7

 

I've tried using this functions but it errors

 

count = calculate(count(open_orders[order_number]),open_orders[due_date] <= TODAY(), open_orders[entry_date] < TODAY() - 7)
 
DAXComparison Operations Do Not Support Comparing Values Of Type Date With Type Text
 
Thanks
1 ACCEPTED SOLUTION
johnt75
Super User
Super User

Make sure that the due_date and entry_date columns are both of type Date, at the moment it looks like at least 1 of them is Text.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @georgec96 ,
try 

count = calculate(count(open_orders[order_number]),open_orders[due_date] <= TODAY() || open_orders[entry_date] < TODAY() - 7)

Regards

johnt75
Super User
Super User

Make sure that the due_date and entry_date columns are both of type Date, at the moment it looks like at least 1 of them is Text.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.