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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
LABrowne
Helper II
Helper II

DAX: Count based on Multiple criteria

Hi there,

 

Currently working on a formula where I need to count the number of orders based on following criteria: (1) the order saturation is over 100% and (2) the order is between it's delivery date (seperate column) and expiry date (again another seperate column). So far I have the following formula meeting criteria (1) but need to include (2) into the formula, please see below:

 

Active Order Count (Order Saturation > 100%) = COUNTX(VALUES(Order[OrderNumber]),IF([OrderSat] > 1,1))
 
Any help amending the formula to add an additional criteria to also only count orders between their delivery and expiry date would e much appreciated!
 
Kind regards,
Luke
2 REPLIES 2
Walter_W2022
Resolver II
Resolver II

Hi @LABrowne please try below, you can tweak it to fit your needs

Active Order Count (Order Saturation > 100%) = COUNTX(VALUES(Order[OrderNumber]),IF([OrderSat] > 1 && DATEDIFF ( [delivery date], [expiry date], DAY )>=0,1))

Hi Walter,

 

Thanks for your assistance but it is only letting me select measures where as delivery date and expiry date are not measures, I'm not sure why?

 

Thanks,

Luke

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.