Forum Discussion
Need help with a In Progress ticket status count
- 5 years ago
Hey millerz1 ,
next to my question regarding the flawed visuals from the sample pbix.
I created something ...
But before I come to my little solution, please allow me to point you to this article: Events-In-Progress | Gerhard Brueckl on BI & Data (gbrueckl.at) This article links to all relevant articles that relate to the events-in-progress problem, and by itself presents a very interesting solution for a very interesting problem. If you are not that familiar with the events-in-progress challenge. I recommend start reading with the article by SqlJason..
My solution starts with an unrelated Date table, this table will be used on the axis of slicers, or feeding the content of slicers. I used this DAX statement to create the table:
Dates Unrelated = var _StartDate = MIN( 'Table_query__8'[Created On] ) var _EndDate = MAX( 'Table_query__8'[Date Closed] ) return CALENDAR( _StartDate , _EndDate )Of course, it's not important how this table looks like (meaning the number of columns), the important thing is that this table is not related to the table that contains the events.
Then I created this measure
open defects tom = var _MinDate = CALCULATE( MIN( 'Dates Unrelated'[Date] ) ) var _MaxDate = CALCULATE( MAX( 'Dates Unrelated'[Date] ) ) return COUNTX( 'Table_query__8' , var __DateStarted = 'Table_query__8'[Created On] var __DateClosed = 'Table_query__8'[Date Closed] return IF( __DateStarted <= _MinDate && ( ISBLANK( __DateClosed ) || __DateClosed > _MinDate ) , 1 , BLANK() ) )This allows to create a visual like this:
Please be aware that I use the date column from the unrelated table on the axis. The measure is simple, as it only reflects on the open daily events, meaning the axis of the visual depicts the smallest detail - a day. for this reason, not all the defined variables are also used. If you also want to know how many events are open during a given time frame like a month, then the conditions get more complex but are described in the above-referenced articles as well.
Hopefully, this provides some new insights on how to tackle your challenge.
Regards,
Tom
Hey millerz1 ,
please create a pbix file that contains sample data, but still reflects your data model, upload the pbix to onedrive or dropbox and share the link. If you are using Excel to create the sample data share the xlsx as well.
Please, describe the expected result based on your sample data.
Regards,
Tom
- millerz15 years agoFrequent Visitor
Will do on Monday. I'm not sure of an easy way to get the sample data into a format that I can share due to security reasons.
I appreciate the response.
- millerz15 years agoFrequent Visitor
TomMartens
Link to power bi file.
https://crownequipmentcorporation-my.sharepoint.com/:u:/g/personal/zack_miller_crown_com/EWnNcmz5NJhDmXIP4u3SPykBjTMIf5ZprRjUA736KTuBTQ?e=RTbBqoLink to data export from SharePoint Online List to Excel