cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CraigC
Helper I
Helper I

Opened vs closed column chart with date filter

Hi All,

 

I am trying to create something like the below where i can compare how many incidents were opened per a day and how many incidents were closed per day. I have a column called Open Date and a Column Called Closed date. I do not have a date table.

Opened vs Close per day.JPG

Thank you

1 ACCEPTED SOLUTION

create a measure for closed incident using userelationship function like below and use this on visual

 

Closed Incidents = 
Calculate(Count(Table1[Incident]),
UseRelationship(Table1[CloseDate], Calendar[Date])
)





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

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





View solution in original post

12 REPLIES 12
jthomson
Solution Sage
Solution Sage

I'd just create a date table and then relate your open date/closed date columns to it - as one of these relationships would be inactive you may need to stick a USERELATIONSHIP option in a measure to count whichever isn't going to be the primary relationship (assuming you just have the one data table)

Hi Jthomson, thanks for the idea. Any help in creating the date table would be greatly appreciated. Would i need to constantly refresh the date table to a new date range?

I mainly use custom tables as I want to include more than just a list of dates, but if you utilise CALENDARAUTO then it should be able to dynamically work out the earliest/latest dates based on your data set

I have checked around for the right way to create a date table but havent been able to find a definitive answer unfortunately.

hope this link will help to create date table






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

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





Ok so i have a date table with both my opened incidents and closed incidents linked to the date column. The closed incident column being an inactive link with the opened incidents being the active link. If i create the graph now it will display the same info for the opened and closed incidents. How do i go about linking the closed incidents column now to show the right data?

Hi @CraigC,

 

Have you tried the solution provided by @parry2k above? Does it work in your scenario? If it works, could you accept it as solution to close this thread?

 

If you still have any question on this issue, feel free to post here. Smiley Happy

 

Regards

Worked perfectly thank you. I just added the current month filter to the date table and everything works.

create a measure for closed incident using userelationship function like below and use this on visual

 

Closed Incidents = 
Calculate(Count(Table1[Incident]),
UseRelationship(Table1[CloseDate], Calendar[Date])
)





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

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





Been trying to use this formula but trying not to count rows for closed dates that are blank as the incidents are not closed yet.

This is exactly the problem i am stuck with, i tried to use your solution but it did not work in my power bi template. Can i please contact you about this problem?

Sorry for the late reply but worked perfectly thank you 🙂

Helpful resources

Announcements
August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power BI Dev Camp Session 24 without aka link and time 768x460.jpg

Ted's Dev Camp - July 28, 2022

Watch Session 24 of Ted's Dev Camp along with past sessions!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors
Top Kudoed Authors