Forum Discussion
Find previous record - Help
- 6 years ago
Hi Anonymous
If my previous reply helped you, could you kindly accept it as a solution so people may find the solutions quickly?
If the problem still exists, please check the workarounds below:
Create calcualated columns below:
repeated = VAR re = CALCULATE ( COUNT ( 'Table 2'[Issue] ), FILTER ( 'Table 2', DATEDIFF ( 'Table 2'[Date], EARLIER ( 'Table 2'[Date] ), DAY ) <= 5 && 'Table 2'[Date] <= EARLIER ( 'Table 2'[Date] ) ) ) RETURN IF ( re > 1, "Yes", "No" ) previous record = CALCULATE(MAX('Table 2'[Issue]),FILTER('Table 2','Table 2'[Date]<EARLIER('Table 2'[Date]))) cause a repeat = VAR c = CALCULATE ( MAX ( 'Table 2'[previous record] ), FILTER ( 'Table 2', 'Table 2'[repeated] = "Yes" ) ) RETURN IF ( [Issue] = c, c, "No" )Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous
If my previous reply helped you, could you kindly accept it as a solution so people may find the solutions quickly?
If the problem still exists, please check the workarounds below:
Create calcualated columns below:
repeated =
VAR re =
CALCULATE (
COUNT ( 'Table 2'[Issue] ),
FILTER (
'Table 2',
DATEDIFF ( 'Table 2'[Date], EARLIER ( 'Table 2'[Date] ), DAY ) <= 5
&& 'Table 2'[Date] <= EARLIER ( 'Table 2'[Date] )
)
)
RETURN
IF ( re > 1, "Yes", "No" )
previous record = CALCULATE(MAX('Table 2'[Issue]),FILTER('Table 2','Table 2'[Date]<EARLIER('Table 2'[Date])))
cause a repeat =
VAR c =
CALCULATE (
MAX ( 'Table 2'[previous record] ),
FILTER ( 'Table 2', 'Table 2'[repeated] = "Yes" )
)
RETURN
IF ( [Issue] = c, c, "No" )
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous6 years agoNot applicable
THANK YOU SO MUCH!