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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount 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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors
Top Kudoed Authors