Forum Discussion
Anonymous
6 years agoNot applicable
Help with Date Filter and Status
I am trying to create a visual that shows the number of widgets open as of a certain date. The SQL we have used in the past to do this is:
AND rs.date_issued <= :RDate
AND ( rm.status IN ('O', 'R')
OR (rm.status = 'C' AND RM.ACT_DATE_CLOSED > :RDate))
AND ( rm.status IN ('O', 'R')
OR (rm.status = 'C' AND RM.ACT_DATE_CLOSED > :RDate))
I have tried two date filters and a status filter, but it has not worked. Any assistance would be helpful.
Thanks!
Hi Anonymous ,
Try this:
IsAfterSelectDate = VAR SelectDate = SELECTEDVALUE ( 'Calendar'[Date] ) VAR CurrentClosedDate = MAX ( 'Table'[Date Closed] ) VAR CurrentIssuedDate = MAX ( 'Table'[Issued Date] ) RETURN IF ( ISBLANK ( CurrentClosedDate ) && SelectDate >= CurrentIssuedDate, 1, IF ( CurrentClosedDate > SelectDate && SelectDate >= CurrentIssuedDate, 1, 0 ) )Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
9 Replies
- Greg_DecklerCommunity Champion
I believe you want the Open Tickets quick measure:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Open-Tickets/m-p/409364
- AnonymousNot applicable
Thanks Greg! This is real close but the user needs to be able to select specifc dates in the visual. Any ideas?
- IceyCommunity Support
Hi Anonymous ,
Please give me some data sample.
Best Regards,
Icey