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
leekep88
Frequent Visitor

Count based on a date in another table

I feel like this should be a simple equation, but I am new to Power BI and am still learning DAX. I have read other solutions on similar questions, but I can't get anything to work in my table. My 'Raw Data' table has ticket data with Pay Period references, Created Dates and Closed Dates. I have another reference table 'Pay Periods' which just has all of the Pay Periods with the associated Start and Stop Dates, as well as a Back Log Date which is just 12 weeks prior to the start date.

 

I am building a Matrix that has all of the Pay Periods with counts of actions created, closed, etc. The column that I am having difficulty with is the Back Log column. All I want to do is count the number of actions that have a 'Raw Data' [Create Date] that is earlier than 'Pay Period'[Back Log Date]. When I use the filter function, it won't let me reference two different tables. I've been stuck on this for two weeks, please help.

2 REPLIES 2
amitchandak
Super User
Super User

@leekep88 , Check if you are looking for active employee kind of measure

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

 

file are attached after signature

I tried an iteration of it, but it returned blanks in all of the columns. I don't really understand the logic of it enough to translate it to my situation. 

 

Back Log = CALCULATE(COUNTX(FILTER('Raw Data','Raw Data'[CREATEDATE]<=max('Pay Period'[Back Log Date])),'Raw Data'[PP CREATE]),CROSSFILTER('Raw Data'[CREATEDATE],'Pay Period'[Back Log Date],None))

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors