Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
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 |
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 4 | |
| 3 |
| User | Count |
|---|---|
| 13 | |
| 9 | |
| 9 | |
| 9 | |
| 8 |