This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Hi all!
I need to calculate the value of the state "in progress" for each ID by checking if the state column has "in progress" and "prioritized", otherwise I will not return anything. In this case below should return to ID 11 = 0 and ID 8737 = 5.
Could you please help me using DAX?
| Work Item Id | Value | State |
| 11 | 1025 | In Progress |
| 11 | 69 | Done |
| 11 | New | |
| 8737 | New | |
| 8737 | 2 | Approved |
| 8737 | 1 | Prioritized |
| 8737 | 5 | In Progress |
| 8737 | 14 | Done |
Solved! Go to Solution.
Thank you for the message, @Anonymous.
RETURN IF((SEARCH("In Progress",_state,1,0) && SEARCH("Prioritized",_state,1,0)>0), _value,0)
Best,
Paul
@Anonymous
Measure =
VAR _state = CALCULATE(CONCATENATEX('Table','Table'[State]," "),ALLEXCEPT('Table','Table'[Work Item Id]))
VAR _value= CALCULATE(SUM('Table'[Value]),'Table'[State]="In Progress")
RETURN IF((SEARCH("In Progress",_state,1,0)+SEARCH("Prioritized",_state,1,0))>=2,_value,0)
Unfortunately it only worked for id 8737 which has both states (prioritized and in progress), but in id 11 it should show 0 since it only has in progress. Is it possible?
Thank you!!
| Work Item Id | State | Value |
| 11 | Done | 1025 |
| 11 | In Progress | 1025 |
| 11 | New | 1025 |
| 8737 | Approved | 5 |
| 8737 | Done | 5 |
| 8737 | In Progress | 5 |
| 8737 | New | 5 |
| 8737 | Prioritized | 5 |
Hi, @Anonymous
and Thank you @Anonymous .
It should work properly with this DAX formula, you can try again or maybe figure around with the table visual.
Best,
Paul
@Anonymous Not able to see your formula
But in above code instead of both of the search output greater than two each search output should be greater than zero.
Thank you for the message, @Anonymous.
RETURN IF((SEARCH("In Progress",_state,1,0) && SEARCH("Prioritized",_state,1,0)>0), _value,0)
Best,
Paul
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 40 | |
| 37 | |
| 31 | |
| 23 | |
| 15 |
| User | Count |
|---|---|
| 76 | |
| 59 | |
| 31 | |
| 31 | |
| 25 |