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
Anonymous
Not applicable

Problem with Inactive Relationship

Hello, I am working with records/rows that have two different dates, open date and close date.  I want to show the counts of open and closed dates by month on a single table.  Therefore, I created relationships with the open and closed dates to a date table.  The open date has an active relationship with the date table and the closed date has an inactive relationship with the date table.  The open date counts are displayed by month as expected, using the month from the date table in the matrix column and the formula =COUNT('Table'[Open Date]).  However, the closed count is not displayed by month and instead the counts appear as having a blank month.  The formula for the closed date is:

=CALCULATE(COUNT('Table'[Close Date]),USERELATIONSHIP('Calendar'[Date],'Table[Close Date])).

 

The resulting table is: 

mstone3_0-1712842365438.png

The closed count is not linked to a month on the date table when the inactive relationship is called with USERELATIONSHIP.  The closed dates occur throughout January through April and should appear under those columns instead of the blank month column.

 

Thanks for your assistance

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thanks again for your reply - I figured out this issue was due to a data formatting error in the source data.  Thank you again.

View solution in original post

4 REPLIES 4
Greg_Deckler
Community Champion
Community Champion

@Anonymous Try:

=CALCULATE(COUNT('Table'[Close Date]),ALL('Table'), USERELATIONSHIP('Calendar'[Date],'Table'[Close Date])).


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler thanks very much for this suggestion.  I tried it and got the result below.  It appears to have taken the total closed count and added it to each month.

mstone3_0-1712845427130.png

 

@Anonymous Any chance you can post some sample data and maybe an image of your data model?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Thanks again for your reply - I figured out this issue was due to a data formatting error in the source data.  Thank you again.

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.

Top Solution Authors