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.
Thank you! v-juanli-msft But because there are so many rows of data, adding another index and merging again causes Power Query/PBI to load for a long time. I was hoping there was a custom column that could be added to perform this
Hello Anonymous,
Not able to help, as I didn't really get the idea what the database is about and what exactly should be calculated
BR
Jimmy