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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

DAX COUNT with WHERE condition on TYPE and DATE

Hi, I want to get count of custid WHERE custtype IN ('New', 'EXISTING')  AND createddate is over 8 weeks ago.

 

Can I please have the DAX query for this ?

 

Many Thanks

1 ACCEPTED SOLUTION
AllisonKennedy
Super User
Super User

@Anonymous What tables and columns are you using? 

As a new measure:

Customer Count = COUNTROWS( FILTER( CustomerTable, CustomerTable[custtype] IN {{"New"}, {"Existing"}} && CustomerTable[createddate] < TODAY() - 56) )


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

View solution in original post

1 REPLY 1
AllisonKennedy
Super User
Super User

@Anonymous What tables and columns are you using? 

As a new measure:

Customer Count = COUNTROWS( FILTER( CustomerTable, CustomerTable[custtype] IN {{"New"}, {"Existing"}} && CustomerTable[createddate] < TODAY() - 56) )


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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