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
_bs_
Advocate I
Advocate I

Days open band and create % of total

Hello, my data is around service desk tickets and I need to work out for all the open tickets (ResolvedDate IS BLANK) how many have been open by day bands and the % of total. E.g

 

Days OpenCount of tickets%
<1 days10.9% 
1-5 days3734.3%
6-30 days6862%
31-60 days21.9%

 

Total = 108

 

sample data:

_bs__0-1753356426388.png

 

I have the total as:

CALCULATE(COUNT('Cases'[CaseNumber]),'Cases'[ResolvedDate] = BLANK ())
= 108
 
Need help with the numerator for each band, so for Day Band 1-5 days, it needs to filter to rows where the Sum of NoOfDaysOpen between 1 and 5 and then count the number of rows. 
Hope that makes sense.
Thank you.
 

 

1 ACCEPTED SOLUTION
v-tejrama
Community Support
Community Support

Hi @_bs_ ,
Thanks for reaching out to the Microsoft fabric community forum.

 

After some experimentation, I successfully identified the optimal approach:

First, I created a calculated column using DATEDIFF to determine the number of days each case has been open, comparing CreatedDate and ResolvedDate, or TODAY() if unresolved.


Next, I introduced another column to categorize these values into bands such as <1 day, 1–5 days, 6–30 days, and so on.
Then, I built a measure with COUNTROWS to quantify the open tickets within each band.
Finally, I developed a percentage measure using the DIVIDE function, dividing the count for each band by the total open tickets (leveraging CALCULATE + ALL to bypass filter context). This method delivers precise insights into ticket distribution.

 

Please find the attached PBIX and Screenshort file for your reference.

 

vtejrama_0-1753438338878.png

Best Regards,
Tejaswi.
Community Support

 

View solution in original post

3 REPLIES 3
v-tejrama
Community Support
Community Support

Hi @_bs_ ,
Thanks for reaching out to the Microsoft fabric community forum.

 

After some experimentation, I successfully identified the optimal approach:

First, I created a calculated column using DATEDIFF to determine the number of days each case has been open, comparing CreatedDate and ResolvedDate, or TODAY() if unresolved.


Next, I introduced another column to categorize these values into bands such as <1 day, 1–5 days, 6–30 days, and so on.
Then, I built a measure with COUNTROWS to quantify the open tickets within each band.
Finally, I developed a percentage measure using the DIVIDE function, dividing the count for each band by the total open tickets (leveraging CALCULATE + ALL to bypass filter context). This method delivers precise insights into ticket distribution.

 

Please find the attached PBIX and Screenshort file for your reference.

 

vtejrama_0-1753438338878.png

Best Regards,
Tejaswi.
Community Support

 

Arul
Super User
Super User

@_bs_ ,

I assume You have already created Days calculated column. To calculate % use this measure,

% = DIVIDE (
    CALCULATE ( COUNT ( 'Cases'[CaseNumber] ), 'Cases'[ResolvedDate] = BLANK () ),
    CALCULATE (
        COUNT ( 'Cases'[CaseNumber] ),
        'Cases'[ResolvedDate] = BLANK (),
        ALL ( 'Cases' )
    )
)




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


LinkedIn


_bs_
Advocate I
Advocate I

May have found the answer:

CALCULATE(COUNTROWS('Cases'),'Cases'[NoOfDaysOpen] >1,'Cases'[NoOfDaysOpen] <6, 'Cases'[ResolvedDate] = BLANK())
 
Then to work out % use DIVIDE function.
 
Is this the most efficient way?

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.