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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
NotMyJob
Helper III
Helper III

Identify items within a specific timeframe

Hopefully this is the right forum for this question, and that is if anyone would know how to calculate or create a Card that would have a calculation which would determine how many of 'X' events were closed out before End of Year.

 

Example:  50 tickets were created in 2024.  30 were closed out.  No problem so far, however, if 10 of those were not slated to be closed out until after 31 Dec 2024, those need to be eliminated from the equation so the Closed Percentage is accurate/not misleading.

 

I suck at formulas... sorry.

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @NotMyJob 

 

Thank you very much hnguy71 for your prompt reply.

 

Here are some ideas I would like to offer for your question:

 

Here's some dummy data

 

“Table”

vnuocmsft_0-1736734990756.png

 

Create a measure.

 

ClosedPercentage = 
VAR ClosedBeforeEOY = 
CALCULATE(
    COUNTROWS('Table'),
    'Table'[ClosedDate] <= DATE(2024, 12, 31)
) // Number of events closed before 12/31/2024
VAR TotalCreated2024 = 
CALCULATE(
    COUNTROWS('Table'),
    YEAR('Table'[CreatedDate]) = 2024
) // Total number of events created in 2024
RETURN
DIVIDE(
    ClosedBeforeEOY,
    TotalCreated2024,
    0
) // Calculate the percentage of closed events

 

Here is the result.

 

vnuocmsft_1-1736735048040.png

 

If you're still having problems, provide some dummy data and the desired outcome. It is best presented in the form of a table.

 

Regards,

Nono Chen

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

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @NotMyJob 

 

Thank you very much hnguy71 for your prompt reply.

 

Here are some ideas I would like to offer for your question:

 

Here's some dummy data

 

“Table”

vnuocmsft_0-1736734990756.png

 

Create a measure.

 

ClosedPercentage = 
VAR ClosedBeforeEOY = 
CALCULATE(
    COUNTROWS('Table'),
    'Table'[ClosedDate] <= DATE(2024, 12, 31)
) // Number of events closed before 12/31/2024
VAR TotalCreated2024 = 
CALCULATE(
    COUNTROWS('Table'),
    YEAR('Table'[CreatedDate]) = 2024
) // Total number of events created in 2024
RETURN
DIVIDE(
    ClosedBeforeEOY,
    TotalCreated2024,
    0
) // Calculate the percentage of closed events

 

Here is the result.

 

vnuocmsft_1-1736735048040.png

 

If you're still having problems, provide some dummy data and the desired outcome. It is best presented in the form of a table.

 

Regards,

Nono Chen

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

hnguy71
Super User
Super User

Hi @NotMyJob 

That's pretty easy to do. Can you provide us with a sample of your data wth expected results? If you can obscure the confidential information and share your current measure tha would be great.



Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors