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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
MarcDT21
Frequent Visitor

Filter by date and give back a quantity

Hey there. I am new to Power BI so this might be a silly question. 

I have two tables (with the calendar table, 3). In the first one "KurseWeiterbildung" I have all visited course dates from our employees with the course details. In the second one "I have two date columns kind of "last qualification" - "next qualification". And now I would like to get to know how many visited courses are lie between this timespan.   

 

Thank you verry much for helping me! 

 

Capture.PNG

1 ACCEPTED SOLUTION
v-jayw-msft
Community Support
Community Support

Hi @MarcDT21 ,

 

Please check the measure.

Measure = CALCULATE(COUNT('Table'[id]),FILTER('Table','Table'[date]>=SELECTEDVALUE('Table (2)'[start date])&&'Table'[date]<=SELECTEDVALUE('Table (2)'[end date])))

1.PNG

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

View solution in original post

3 REPLIES 3
v-jayw-msft
Community Support
Community Support

Hi @MarcDT21 ,

 

Please check the measure.

Measure = CALCULATE(COUNT('Table'[id]),FILTER('Table','Table'[date]>=SELECTEDVALUE('Table (2)'[start date])&&'Table'[date]<=SELECTEDVALUE('Table (2)'[end date])))

1.PNG

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

late, but thank you very much - it works just fine!

amitchandak
Super User
Super User

@MarcDT21 , You need a common person ID dimension, Create one  and try a measure formula like

 

new table -Person

Existing table -KurseWeiterbildung, mitareiter. I used easy different column name for dates


countx(filter(values(Person[personNumber]), max(KurseWeiterbildung[DatumKurs]) >= min(mitareiter[StartDate]) && max(KurseWeiterbildung[DatumKurs]) <= min(mitareiter[EndDate])),KurseWeiterbildung[IDMAUrs])

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.