Forum Discussion
Identify items within a specific timeframe
- Anonymous1 year ago
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”
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 eventsHere is the result.
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.
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”
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.
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.