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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors