Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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:
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
Solved! Go to Solution.
Thanks again for your reply - I figured out this issue was due to a data formatting error in the source data. Thank you again.
@mstone3 Try:
=CALCULATE(COUNT('Table'[Close Date]),ALL('Table'), USERELATIONSHIP('Calendar'[Date],'Table'[Close Date])).
@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 Any chance you can post some sample data and maybe an image of your data model?
Thanks again for your reply - I figured out this issue was due to a data formatting error in the source data. Thank you again.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
69 | |
55 | |
36 | |
31 |
User | Count |
---|---|
84 | |
63 | |
63 | |
49 | |
45 |