Forum Discussion
First Time Fix (New Job Raised Within 14 days)
- 2 years ago
COLUMN Repairwithin =
VAR filttable =
FILTER (
Sheet1 --Remove all filters
,
Sheet1[Job Category] = "Repair"
&& Sheet1[Date] > EARLIER ( Sheet1[Date] )
&& Sheet1[Date]
<= EARLIER ( Sheet1[Date] ) + 14
&& Sheet1[ClientID] = EARLIER ( Sheet1[ClientID] )
) --Filter to only repairs that happen after current row and on or before 14 days in the future
RETURN
IF (
Sheet1[Job Category] = "Repair"
&& COUNTROWS ( filttable ) > 0,
"Yes",
"No"
)
--If the current row is a repair and the jobs is greater than 0 return Yes
COLUMN Repairwithin =
VAR filttable =
FILTER (
Sheet1 --Remove all filters
,
Sheet1[Job Category] = "Repair"
&& Sheet1[Date] > EARLIER ( Sheet1[Date] )
&& Sheet1[Date]
<= EARLIER ( Sheet1[Date] ) + 14
&& Sheet1[ClientID] = EARLIER ( Sheet1[ClientID] )
) --Filter to only repairs that happen after current row and on or before 14 days in the future
RETURN
IF (
Sheet1[Job Category] = "Repair"
&& COUNTROWS ( filttable ) > 0,
"Yes",
"No"
)
--If the current row is a repair and the jobs is greater than 0 return Yes
Hello SamWiseOwl ,
I'm getting errors on the return, can you add this into the pbix and send the link please
Thanks
Daniel
- SamWiseOwl2 years ago
Super User
- Daniel_carle2 years ago
Helper I
This is working brilliantly thank you, I've done this query for just over 2 million rows, any idea how to speed up the process.