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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Sonnet
Helper I
Helper I

Using countx with three conditions

Hi everyone, I have a table of risks and the calendar table. I need to calculate the number of risks that were open in a certain period, where their status is high and the date closed should be within 14 days from the date opened, if more than 14 days, then the risk is non compliant.

I have used the following measure but I am getting blank values:

 

Non Compliant Vulnerabilities = CALCULATE( COUNTX(FILTER('Web Vulnerabilities', 'Web Vulnerabilities'[Date Opened]<= MAX('Calendar'[Date]) && 'Web Vulnerabilities'[Risk Description] = "high" && 'Web Vulnerabilities'[Date Closed] > DATEADD('Web Vulnerabilities'[Date Opened],+14,DAY)),'Web Vulnerabilities'[Title]),CROSSFILTER('Web Vulnerabilities'[Date Opened],'Calendar'[Date],None))
 
Any suggestions?
1 REPLY 1
govindarajan_d
Super User
Super User

Everything seems to be correct. But I cannot understand this why use CROSSFILTER?

 

Also, since MAX(Calendar[date]) is used, did you check if the max date points to some future date where there might not be vulnerabilities?

 

If you can share a sample data pbix file, it would be helpful to look at. 

Helpful resources

Announcements
November Fabric Update Carousel

Fabric Monthly Update - November 2025

Check out the November 2025 Fabric update to learn about new features.

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!

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.

Users online (27)