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
MiguelSantos
Frequent Visitor

Date Table Showing Incorrect Month Number

What I am trying to accomplish -- Create a divergent bar chart of open closed issues by month, where the closed cases show as negative in the month they were resolved.


Like this graph I created below but the numbers are pretty far off:

MiguelSantos_5-1665511248226.png

 



Problem/s -- 

First thing I noticed is my calendar table relationship is not working as I thought I should. I have a calendar table built like this.

MiguelSantos_0-1665510848090.png

And this table with an inactive relationship

MiguelSantos_1-1665510930769.png

MiguelSantos_2-1665510961398.png

The strange thing is that when I create a basic table with the date of the incident and try and get the month number from the calendar table it reflects incorrect numbers and can't really wrap my head around why.

MiguelSantos_3-1665511020716.png

 

Secondly, I am trying to calculate the number of issues closed each month using the following measure; however, whenever I add the measure to the bar chart it just adds the counts to the month the issues were open. 

MiguelSantos_4-1665511119734.png


Any help would be appreciated. I dont know if this is a fairly basic concept but I am having a hard time wrapping my head around it.




 

3 REPLIES 3
MFelix
Super User
Super User

Hi @MiguelSantos ,

 

First of all check if the type of the columns on the relationships are the same so all that relate with the calendar

table shoud be has a date.

 

What is the active relationship you have between the calendar and the BD is it based on created date or on date of incident? The active relationship is the one that is used on the table image you present on with the incorrect month, and is also the one that is used when you use a column on the visualization or create a simple metric such has countrows.

 

If this does not help can you please share a mockup data or sample of your PBIX file. You can use a onedrive, google drive, we transfer or similar link to upload your files.

If the information is sensitive please share it trough private message.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



MFelix thank you for your time and assitance. 

What is the active relationship you have between the calendar and the BD?
So the active relationship, I have between the 8D and the calendar is via my fact table. 8D[key] 1 --> * Fact Table[key] -- >Calendar

However, I have an inactive relationship between my 8D table and my calendar table
8Ds[8D Resolve Date Rel] (This column is a duplicate of the Resolved Date) --> Calendar[date]

Ill keep working on this with your provided suggestions and report back with what happens. Im kind of convinced I have made a spiderweb of relationships between my tables that I am struggling to correct.


Hi @MiguelSantos ,

 

If you want can you please share a mockup data or sample of your PBIX file. You can use a onedrive, google drive, we transfer or similar link to upload your files.

If the information is sensitive please share it trough private message.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



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.