Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Hi All,
I am trying to create a measure to show as 1 if either of the line item status is 'DE' for that order number.
I created on measure but its displaying as 1 only for that line number with DE as status for that order but It should display as 1 for all the lines if either of line status is 'DE'
Please help.
This is Solved:
This is how I did it on my data set. COuld you please share your DAX query and sample data file. I can replicate the code for you.
Replicated it on your Data Too.
Measure = IF(CALCULATE(COUNT(TestData[OrderNumber]), ALLEXCEPT(TestData,TestData[OrderNumber]),TestData[col_LineItemStatus]="DE")>1,1,0)
Please try this expression in your measure
NewMeasure =
VAR DErows =
CALCULATE (
COUNTROWS ( Table ),
ALL ( Table ),
VALUES ( Table[Order Number] ),
Table[col_LineItemStatus] = "DE"
)
RETURN
IF (
DErows >= 1,
1,
0
)
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 3 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 13 | |
| 9 | |
| 8 | |
| 8 | |
| 7 |