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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
MadhuMj
New Member

I am trying to find Created and Resolved keys per week.

Sample DataSample Data

1 ACCEPTED SOLUTION
d_gosbell
Super User
Super User

First create a separate date table that has a Date and Week column. The Dates rows should be a continuous series of values that cover the range of possible values in your Created and Resolved date columns. If you don't have a date table already you can use the CALENDAR() or CALENDARAUTO() functions to build this series of dates and then create a calculated column to get the week number plus any other columns you need.

 

Then create a relationship to the CD and RD columns (the relationship to the RD will be disabled as you can only have 1 active relationship at a time)

 

Then you create 2 measures (assuming your current table is called 'Table1')

 

Created Count= Countrows( 'Table1' )

 

Resolved Count = CALCULATE( COUNTROWS( 'Table1') , USERELATIONSHIP( 'Date'[Date], 'Table1'[RD] ) )

 

Then if you create a slicer on the week column and filter for week 41 you should see the values you want from the 2 measures above.

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

You need to create one active and one inactive join with the date dimension.

Means both create date and resolve date will join with date of date dimension and then by using userelation you can choose the date to follow in a measure. Rest will be taken care by grouping or filter

 

Please refer example how can use userelation

https://community.powerbi.com/t5/Desktop/DATE-RANGE-SLICERS-TO-COMPARE-NETSALES-OF-A-DATE-RANGE/td-p...

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks.

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
d_gosbell
Super User
Super User

First create a separate date table that has a Date and Week column. The Dates rows should be a continuous series of values that cover the range of possible values in your Created and Resolved date columns. If you don't have a date table already you can use the CALENDAR() or CALENDARAUTO() functions to build this series of dates and then create a calculated column to get the week number plus any other columns you need.

 

Then create a relationship to the CD and RD columns (the relationship to the RD will be disabled as you can only have 1 active relationship at a time)

 

Then you create 2 measures (assuming your current table is called 'Table1')

 

Created Count= Countrows( 'Table1' )

 

Resolved Count = CALCULATE( COUNTROWS( 'Table1') , USERELATIONSHIP( 'Date'[Date], 'Table1'[RD] ) )

 

Then if you create a slicer on the week column and filter for week 41 you should see the values you want from the 2 measures above.

Thank you so much it worked. I am new to power BI and started learning by taking small scenarios.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.