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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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
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.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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