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
vaalyushin
Helper I
Helper I

Get only open tickets

Hi Guys ,

I need your help in something , 

This is my dataset : 

issue_numberstatus_change_datecurrent_statusstatuscreation_datecreation_date - CopyCriticalLabel
253012/7/2021 0:00ClosedOpen12/7/2021 0:0012/7/2021 23:22High
253012/7/2021 0:00OpenOpen12/7/2021 0:0012/7/2021 23:22High
253012/9/2021 0:00ClosedClosed12/7/2021 0:0012/7/2021 23:22High
253012/9/2021 0:00OpenClosed12/7/2021 0:0012/7/2021 23:22High
261012/22/2021 0:00ClosedClosed12/22/2021 0:0012/22/2021 12:08Low
261012/22/2021 0:00ClosedOpen12/22/2021 0:0012/22/2021 12:08Low
261012/22/2021 0:00ClosedResolved12/22/2021 0:0012/22/2021 12:08Low
261012/22/2021 0:00ClosedIn progress12/22/2021 0:0012/22/2021 12:08Low
261012/22/2021 0:00OpenClosed12/22/2021 0:0012/22/2021 12:08Low
261012/22/2021 0:00OpenOpen12/22/2021 0:0012/22/2021 12:08Low
261012/22/2021 0:00OpenResolved12/22/2021 0:0012/22/2021 12:08Low
261012/22/2021 0:00OpenIn progress12/22/2021 0:0012/22/2021 12:08Low
262012/23/2021 0:00ClosedClosed12/23/2021 0:0012/23/2021 13:24Low
262012/23/2021 0:00ClosedOpen12/23/2021 0:0012/23/2021 13:24Low
262012/23/2021 0:00ClosedResolved12/23/2021 0:0012/23/2021 13:24Low
262012/23/2021 0:00ClosedIn progress12/23/2021 0:0012/23/2021 13:24Low
262012/23/2021 0:00OpenClosed12/23/2021 0:0012/23/2021 13:24Low
262012/23/2021 0:00OpenOpen12/23/2021 0:0012/23/2021 13:24Low
262012/23/2021 0:00OpenResolved12/23/2021 0:0012/23/2021 13:24Low
262012/23/2021 0:00OpenIn progress12/23/2021 0:0012/23/2021 13:24Low
262012/23/2021 0:00ResolvedClosed12/23/2021 0:0012/23/2021 13:24Low
262012/23/2021 0:00ResolvedOpen12/23/2021 0:0012/23/2021 13:24Low
262012/23/2021 0:00ResolvedResolved12/23/2021 0:0012/23/2021 13:24Low
262012/23/2021 0:00ResolvedIn progress12/23/2021 0:0012/23/2021 13:24Low
264112/28/2021 0:00ClosedOpen12/28/2021 0:0012/28/2021 18:11Low
264112/28/2021 0:00OpenOpen12/28/2021 0:0012/28/2021 18:11Low
264112/28/2021 0:00WaitingOpen12/28/2021 0:0012/28/2021 18:11Low
26412/7/2022 0:00ClosedClosed12/28/2021 0:0012/28/2021 18:11Low
26412/7/2022 0:00OpenClosed12/28/2021 0:0012/28/2021 18:11Low
26412/7/2022 0:00WaitingClosed12/28/2021 0:0012/28/2021 18:11Low

 

 

I need get table with only open tickets. The main column with status is current_status. I tried this dax code:

 

 

Open issue = 
FILTER (
         'jira_vulnerability_issues',
          jira_vulnerability_issues[current_status] = "Open" && jira_vulnerability_issues[status_change_date] = [Max Change Date]
    )


Max Change Date = CALCULATE(MAX('jira_vulnerability_issues'[status_change_date]),ALLSELECTED('jira_vulnerability_issues'[status_change_date]))

 

 

 

but it doesn't work

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Okay so what I understand is that you want all the open tickets on the max change date.
Is this the result you want?

Aditya_Meshram_0-1647866303998.png

You can use 

Open issue = 
var Max_Change_Date = CALCULATE(MAX('jira_vulnerability_issues'[status_change_date]),ALLSELECTED('jira_vulnerability_issues'[status_change_date]))
return
FILTER (
         'jira_vulnerability_issues',
          jira_vulnerability_issues[current_status] = "Open" && jira_vulnerability_issues[status_change_date] = Max_Change_Date
    )

 

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @vaalyushin ,

 

Has methods provided above solved your problem? If so, please kindly Accept helpful replies as the solution. More people will benefit from it.

 

Below is my simple test:

New Table = 
var _maxDate=MAX('Table'[status_change_date])
return 
FILTER('Table',[current_status]="Open" && [status_change_date]=_maxDate)

Output:

Eyelyn9_0-1648114995976.png

 

 

Or if the max_date is a dynamic selection in slicer, please firstly create a date table:

Date Slicer = CALENDAR(MIN('Table'[status_change_date]), MAX('Table'[status_change_date])) 

Then create a flag measure, and apply it to visual-filter pane, set as "is 1":

Eyelyn9_2-1648115419507.png

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hi @vaalyushin 
can you try

 

Open issue = 
FILTER (
         'jira_vulnerability_issues',
          jira_vulnerability_issues[status_change_date] = [Max Change Date],
          jira_vulnerability_issues[current_status] = "Open"
    )

 

Sorry, i forgot a part of dax measure. my measure is the same, but it doesn't work (i get all tickets with closed state too)

Anonymous
Not applicable

Okay so what I understand is that you want all the open tickets on the max change date.
Is this the result you want?

Aditya_Meshram_0-1647866303998.png

You can use 

Open issue = 
var Max_Change_Date = CALCULATE(MAX('jira_vulnerability_issues'[status_change_date]),ALLSELECTED('jira_vulnerability_issues'[status_change_date]))
return
FILTER (
         'jira_vulnerability_issues',
          jira_vulnerability_issues[current_status] = "Open" && jira_vulnerability_issues[status_change_date] = Max_Change_Date
    )

 

@vaalyushin Maybe:

Table =
  VAR __Table = SUMMARIZE('Table',[issue_number],"last_date",MAX('Table'[status_change_date]))
  VAR __Table1 = 
    ADDCOLUMNS(
      __Table,
      "current_status",
          VAR __issue = [issue_number]
          VAR __date = [last_date]
        RETURN
          MAXX(FILTER('Table',[issue_number] = __issue && [status_change_date] = __date),[current_status)
RETURN
  FILTER(__Table1,[current_status] = "Open")


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

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.