Forum Discussion
Calculate Difference between 2 rows based on another column filter
- 4 years ago
Hi,
This calculated column formula works
=if(CALCULATE(MAX(Data[Dates]),FILTER(Data,Data[serialid]=EARLIER(Data[serialid])))=Data[Dates],ABS(Data[GenHours]-LOOKUPVALUE(Data[GenHours],Data[Dates],CALCULATE(max(Data[Dates]),FILTER(Data,Data[serialid]=EARLIER(Data[serialid])&&Data[Dates]<EARLIER(Data[Dates]))),Data[serialid],Data[serialid])),BLANK())Hope this helps.
Thank you so much... This works well when used in a Matrix that groups by incident id and unit. I modified it slightly to get the format I needed:
You are welcome. I do not understand your requirement. Please show the expected result very clearly.
- DarrelDonatto4 years agoFrequent Visitor
I am looking to get the maximum unit response time to appear on the line for the incident ID. Currently, I am getting the minimum time for all incident ids. For this case, instead of the 6:50 it should show 13:57.
- Ashish_Mathur4 years agoSuper User
Hi,
Try this measure
Response time_new = MAXX(Values(Data[Inci_id]),[Response time])
Hope this helps.
- DarrelDonatto4 years agoFrequent Visitor
That is still giving me the least or minimum time of all units for that Incident under the Incident ID row. I am trying to get the maximum time.
- Ashish_Mathur4 years agoSuper User
Hi,
Share the link from where i can download your PBI file.