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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
pranit1997
Helper I
Helper I

Count number of ID's in Target date and actual date in a same table / matrix

Data Structure:

BUIDTarget DateFiled Date
BU1123451/1/20222/10/2022
BU1567891/1/2022 
BU1125672/20/20222/15/2022
BU1145683/1/20222/25/2022

 

Required Output

BU Jan-2022Feb-2022Mar-2022
BU 1Target211
 Filed 3 

Trying to figure this out since a long time but still stuck!

New to power bi. Request anyone to help me out with this.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@pranit1997 , Create a common date table join with both dates one date will be inactive, Use userelationship to activate the join. Use SHOW on row in matrix visual

Assume Target date is active 

Target = count(Table[ID])

 

Filed date inactive join

Filed =

calculate(count(Table[ID]), userelationship(Table[Filed Date], 'Date'[Date]))

 

 

 

Addcolumns(calendar(date(2020,01,01), date(2021,12,31) ), "Month" , month([date])
, "Year", year([date])
, "Month Year", format([date],"mmm-yyyy")
, "Month year sort", year([date])*100 + month([date])
, "Month",FORMAT([Date],"mmmm")
, "Month sort", month([DAte])

)

 

https://radacad.com/userelationship-or-role-playing-dimension-dealing-with-inactive-relationships-in...

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

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@pranit1997 , Create a common date table join with both dates one date will be inactive, Use userelationship to activate the join. Use SHOW on row in matrix visual

Assume Target date is active 

Target = count(Table[ID])

 

Filed date inactive join

Filed =

calculate(count(Table[ID]), userelationship(Table[Filed Date], 'Date'[Date]))

 

 

 

Addcolumns(calendar(date(2020,01,01), date(2021,12,31) ), "Month" , month([date])
, "Year", year([date])
, "Month Year", format([date],"mmm-yyyy")
, "Month year sort", year([date])*100 + month([date])
, "Month",FORMAT([Date],"mmmm")
, "Month sort", month([DAte])

)

 

https://radacad.com/userelationship-or-role-playing-dimension-dealing-with-inactive-relationships-in...

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

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI 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.

Top Solution Authors
Top Kudoed Authors