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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.