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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
SlyF0x
Regular Visitor

Count distinct cases between 2 measures

 

I am working on a measure to calculate when a support case is closed and when it is closed within a fiscal month. Below I have an example of when a case was opened before the fiscal month and closed within that month. A case that was opened and closed within the fiscal month and lastly when a case was opened in the fiscal month but closed after the end. My 'Total Fiscal Received' column is marking them as 1 but the total is wrong. This should be 3 rather than 2. I have the formula for this to be: Total Fiscal Resolved = if([Fiscal Resolved]= BLANK(),[Resolved],[Fiscal Resolved])

Fiscal Resolved = CALCULATE(COUNTA(SF_Cases[Closed Date ONLY]),FILTER(SF_Cases,SF_Cases[Created Date ONLY]RELATED(FiscalCalendar_Lookup[Start of Fiscal Month])))

Resolved = CALCULATE(COUNTA(SF_Cases[Closed Date ONLY]),USERELATIONSHIP(FiscalCalendar_Lookup[Date],SF_Cases[Closed Date ONLY]))

 

I am wondering if anyone has an idea of how I can get this measure to calculate properly.

 

Period-YearCase NumberCreated Date OnlyClosed Date OnlyFiscal ResolvedStart Of Fiscal MonthEnd of Fiscal MonthResolvedCount of Case NumberTotal Fiscal Resolved
Apr-20196867253/29/20194/1/2019 4/1/20194/28/20191 1
Apr-20197255074/25/20194/29/2019    14/1/20194/28/2019 11
Apr-20197280324/26/20194/26/2019    14/1/20194/28/2019111
TOTALN/AN/AN/A    2N/AN/A222

 

2 REPLIES 2
lbendlin
Super User
Super User

your sample data is inconstent (especially the last close date)

 

Does it matter how long a case was open? What if it is open for more than one month? More than 3 months?

I apologize. I was not able to post a photo of my table and had to manually create the results. I have updated the table to reflect the accurate information. As to your question, it does not matter how long a case is open. There are times a case can be open for 1 year then closed and that case should be counted in that specific fiscal period since it was closed. Which it currently is being counted in my resolved column since it was open before the specific fiscal period, in this case Apr-2019. This type of example is the first row. The case was opened before the fiscal period but closed during that period. My Resolved measure is calculating that correctly but it does not seem to be getting counted in the Total Fiscal Resolved of cases closed or open during that fiscal month.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors