Forum Discussion
How to count rows from one table based on another table with a filter
I have two tables, Real and Plan, with the following column names:
Table 1: REAL
distance, track, date
Table 2: PLAN
planned_distance, planned_track, date
What I need to do is calculate adherance to the plan by counting how many tracks were actually ran that were on the plan, for each day. In other words, from the planned tracks to be ran in each day, how many were actually ran.
I tried something like:
COUNTX( REAL,
FILTER( PLAN, PLAN[distance] > 0 && REAL[distance] > 0 )
)
But it´s not working, I need the count of the tracks that were in plan and actually ran.
Does anyone have an idea on how to do this?
1 Reply
- v-henryk-mstfCommunity Support
Hi norman123123 ,
Is it possible to provide relevant test data and screenshots of desired results when it is not yet clear what you are looking for?
How to Get Your Question Answered Quickly - Microsoft Power BI Community
Looking forward to your reply.
Best Regards,
Henry