Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
DanielCarvalho
Helper III
Helper III

I want to count the tickets that are open and in progress in the latest selected date

Hello Community, currently  I have this measure:

Count of Status = var a=SUMMARIZE(TICKET_DASHBOARD_GAVATAR_HISTORICAL,TICKET_DASHBOARD_GAVATAR_HISTORICAL[CASEID],TICKET_DASHBOARD_GAVATAR_HISTORICAL[Ticket Status 2])
return COUNTAX(a,TICKET_DASHBOARD_GAVATAR_HISTORICAL[Ticket Status 2])
 
Ticket Status 2 has 5 options = Open, In progress, On hold, Closed and blank
 
My dashboard has diferent pages and one of those pages is OPEN & IN PROGRESS TICKETS and I have a card with this measure and with a filter to only count Open and In progress tickets. The problem is that when in my slicer I have current month selected, it is counting the tickets that from the begging of month to today have been in those 2 status even if they are now on another. I want it to only show me tickets that are still in that status as of TODAY. If i have another month selected I want to see the tickets in that were in that status on the last day of that month.
1 ACCEPTED SOLUTION
scott_henderson
Helper II
Helper II

Can you create a Summarize Table, using the pbi summarize function, summarize by latest date, case id and staus ?

https://learn.microsoft.com/en-us/dax/summarize-function-dax

View solution in original post

7 REPLIES 7
scott_henderson
Helper II
Helper II

Fantastic, Glad it worked : )

scott_henderson
Helper II
Helper II

Can you create a Summarize Table, using the pbi summarize function, summarize by latest date, case id and staus ?

https://learn.microsoft.com/en-us/dax/summarize-function-dax

Got it to work by doing this:

 

Count of Status = VAR MaxDate = CALCULATE(MAX(TICKET_DASHBOARD_GAVATAR_HISTORICAL[Date]), ALLSELECTED(Calendar)) VAR a = CALCULATETABLE( SUMMARIZE( FILTER( TICKET_DASHBOARD_GAVATAR_HISTORICAL, TICKET_DASHBOARD_GAVATAR_HISTORICAL[Date] = MaxDate ), TICKET_DASHBOARD_GAVATAR_HISTORICAL[CASEID], TICKET_DASHBOARD_GAVATAR_HISTORICAL[Ticket Status 2] ), ALLSELECTED(Calendar) ) RETURN COUNTAX(a, TICKET_DASHBOARD_GAVATAR_HISTORICAL[Ticket Status 2])

scott_henderson
Helper II
Helper II

Yep, makes sense, hence if you only want to count open or in progress, get another column in there and do your count on that column ?

I will still have the same problem, as each ticket in my data repeats every single day, and I need it to always look at those tickets (CASE ID) in the latest available date. 

scott_henderson
Helper II
Helper II

Can you create a calculated column ?

IF ticket staus 2 equals "Open" or "In porgress, give it a value of 1, if not 0 then use that as a filter on your card visual ?

Whilst I was looking at it now I realized what could be the problem but not yet the solution. The problem is that in my measure I am looking at a unique CASE ID only, but it is not looking at my latest entry for each one of those unique ids. Therefore if it is now in another status but he is looking at a line from an older date when it was in fact open, the he will be counting that ticket

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.