Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
HELLO, HELP ME PLEASE! I have a table and I would like to do the subtraction between the two rows of dates that I have selected (in gray). But I would have to take the first date with the status "NEW" and the first date with and status "FEASIBILITY ERROR" and make the difference.I want to filter only on messages that contain "322". and finally I would like to do this with client 1 / Value 1, client 1 / Value 2 etc, Client 2 / value 1, 2,3 etc.
Thank's a lot for your help.
@Anonymous , Try a measure like
Measure =
VAR __id = MAX ('Table'[compte] )
VAR __date1 = CALCULATE ( MAX('Table'[Date] ), ALLSELECTED ('Table' ), 'Table'[compte] = __id && 'Table'[Status] = "NEW" && search("322",'Table'[message],,0)>0)
VAR __date2 = CALCULATE ( MAX('Table'[Date] ), ALLSELECTED ('Table' ), 'Table'[compte] = __id && 'Table'[Status] = "FEASIBILITY ERROR" && search("322",'Table'[message],,0)>0)
return
datediff( CALCULATE ( min ('Table'[Date] ), VALUES ('Table'[compte] ),'Table'[compte] = __id,'Table'[Date] >= __date1 && 'Table'[Status] = "NEW" && search("322",'Table'[message],,0)>0 ) , CALCULATE ( min ('Table'[Date] ), VALUES ('Table'[compte] ),'Table'[compte] = __id,'Table'[Date] >= __date2 && 'Table'[Status] = "FEASIBILITY ERROR" && search("322",'Table'[message],,0)>0),day)
| User | Count |
|---|---|
| 5 | |
| 5 | |
| 3 | |
| 2 | |
| 2 |