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
Hello Daniel_carle ,
Let me know how you get on 🙂
Hello SamWiseOwl,
Thanks for the reply, my results are all returning as 'No', can you please share the revised pbix file
Thanks
Daniel
- SamWiseOwl2 years ago
Super User
- Daniel_carle2 years ago
Helper I
Hello SamWiseOwl ,
Thanks again, Is it possible that this can be a non measure column so I can see the results in the table rather then creating a visual to see it as I need to do another DAX query which links to these results
Thanks
Daniel
- SamWiseOwl2 years ago
Super User
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