One way to accomplish this is to create a calculated measure that excludes the most recent month's data from the calculation of the service level percentage.
Assuming you have a date field in your data model, you can use the following DAX formula to create the calculated measure:
Service Level Percentage (Excluding Most Recent Month) =
VAR MaxDate = MAX('Table'[Date])
VAR ExcludedData = CALCULATE(SUM('Table'[Completed]), 'Table'[Date] = MAXDate)
RETURN
DIVIDE(
CALCULATE(SUM('Table'[Completed]), 'Table'[Date] < MaxDate) - ExcludedData,
CALCULATE(SUM('Table'[Target]), 'Table'[Date] < MaxDate)
)
In this formula, Table
is the name of your table, Date
is the name of your date column, Completed
is the name of the column containing the completed service requests, and Target
is the name of the column containing the target number of service requests.
The formula first calculates the maximum date in your data model and saves it in a variable called MaxDate
. It then calculates the sum of completed service requests for that maximum date and saves it in a variable called ExcludedData
.
The actual service level percentage is then calculated by subtracting the ExcludedData
from the sum of completed service requests for all dates before the MaxDate
, and dividing by the sum of target service requests for all dates before the MaxDate
.
You can then use this calculated measure in your Power BI visualizations to show the service level percentage excluding the most recent month.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2021-11-06 11:00:00 +0000
Seen: 10 times
Last updated: Nov 02 '22
How can I transform a standard date to a Jalali date in ClickHouse?
What is the process for transforming a date into the desired format using the dayjs module?
Can you assist me with creating a calendar table in POWER BI?
How can I use the If function to exclude non-workdays?
Can the Excel cell entries be transformed into a uniform date and time format?