Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi,
I am hoping someone can help me create a measurement that counts the number of orders that are shipped late.
Here is my current measurement. I know why this is not correct but cannot figure out how to count late our orders.
CUSTOMER ORDER NUMBER | CUSTOMER ORDER LINES | ITEM | NEW ITEM | BUSINESS DAYS | SLA | Meets SLA | Does Not Meet SLA |
CP00022417 | 1 | 529A4142 | 0 | 2 | Meets SLA | 1 | |
CP00022417 | 2 | 529A4143 | 0 | 2 | Meets SLA | 1 | |
CP00022417 | 3 | 526G4134 | 0 | 32 | Does Not Meet SLA | 1 | |
CP00022417 | 4 | 526G4135 | 0 | 32 | Does Not Meet SLA | 1 | |
CP00022417 | 5 | 526G4137 | 0 | 32 | Does Not Meet SLA | 1 | |
CP00022417 | 6 | 526G4139 | 0 | 32 | Does Not Meet SLA | 1 | |
CP00022417 | 7 | 526G4140 | 0 | 32 | Does Not Meet SLA | 1 | |
CP00022417 | 8 | 526G4133 | 1 | 32 | Does Not Meet SLA | ||
CP00022417 | 9 | 526G4136 | 1 | 32 | Does Not Meet SLA | ||
CP00022417 | 10 | 526A2016BA | 0 | 32 | Does Not Meet SLA | 1 | |
CP00022417 | 11 | A32-160020 | 0 | 32 | Does Not Meet SLA | 1 |
Solved! Go to Solution.
Hi @Anonymous,
You can try to use the following measure formulas to get the order numbers that are shipped late based on the conditions:
formula =
VAR summary =
SUMMARIZE (
ALLSELECTED ( 'Table' ),
[CUSTOMER ORDER NUMBER],
[CUSTOMER ORDER LINES],
[NEW ITEM],
[SLA]
)
VAR NewOrders =
SUMMARIZE ( FILTER ( summary, [NEW ITEM] = 1 ), [CUSTOMER ORDER NUMBER] )
RETURN
COUNTROWS (
SUMMARIZE (
FILTER (
summary,
NOT ( [CUSTOMER ORDER NUMBER] IN NewOrders )
&& [SLA] = "Does Not Meet SLA"
),
[CUSTOMER ORDER NUMBER]
)
)
Regards,
Xiaoxin Sheng
Hi @Anonymous,
You can try to use the following measure formulas to get the order numbers that are shipped late based on the conditions:
formula =
VAR summary =
SUMMARIZE (
ALLSELECTED ( 'Table' ),
[CUSTOMER ORDER NUMBER],
[CUSTOMER ORDER LINES],
[NEW ITEM],
[SLA]
)
VAR NewOrders =
SUMMARIZE ( FILTER ( summary, [NEW ITEM] = 1 ), [CUSTOMER ORDER NUMBER] )
RETURN
COUNTROWS (
SUMMARIZE (
FILTER (
summary,
NOT ( [CUSTOMER ORDER NUMBER] IN NewOrders )
&& [SLA] = "Does Not Meet SLA"
),
[CUSTOMER ORDER NUMBER]
)
)
Regards,
Xiaoxin Sheng
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
9 | |
8 | |
8 |
User | Count |
---|---|
14 | |
12 | |
11 | |
11 | |
8 |