Forum Discussion
Help With Event In Progress Visualization
- 5 years ago
Howdy!
Thank you for the apology. 🙂
I found this article that might interest you. But I took a simpler approach to the problem. Here's the code:Events Open in Period = VAR EventsCreated = CALCULATETABLE( VALUES(ft_records[Record_ID]), FILTER( ALL(ft_records), ft_records[Start Date] <= MAX(Date_table[Date]) ) ) VAR EventsPreviouslyClosed = CALCULATETABLE( VALUES(ft_records[Record_ID]), FILTER( ALL(ft_records), ft_records[Finish Date] < MIN(Date_table[Date]) ) ) RETURN COUNTROWS( EXCEPT( EventsCreated, EventsPreviouslyClosed ) )What we're doing here is creating a couple of table variables. The first one is all events opened on or before the last date in a month. The second is all events closed prior to the month in question. I'm working with the assumption that an event will be open - even if only for an instant - if it happened to be closed on the same day. The EXCEPT() function returns rows from one table that are not found in the other, and then we just count the rows. Here's what the result looks like.
I spot checked this in Excel by manually counting records for June and July and it appears accurate. But you should probably check a little more just to be sure.
You can download the PBIX here.
I've put some thought into how to reply to this...
In your original request you stated "This has really got me stupmed and I'm not sure how to move forward from here, so any help would be welcome." I am help.
In subsequent replies you stated:
"Thanks for taking the time to look at this, I've downloaded your pbix file and had a look at what you've done but it's not quite doing what I want." and "In your snippet I want to be able to select the point on the line chart for 45 in progress events and the record table on the left to filter and show just the 45. Similarly do the same for closed and created records. In your snippet it shows all the records and doesn't filter any further." I asked for further clarification because you didn't provide a whole lot of context to work with so I was giving it my best guess. I asked a couple of clarifying questions because what you're asking for doesn't make sense...see my last response. And the most complete definition of context came in what came across as a lecture. So not cool.
You need to realize that people like myself to respond in forums such as this are volunteering their time and effort for your help. I'm sure you'll get this figured out. Good luck!