Forum Discussion
Syntax Error Occurred during Parsing: Invalid Token Line 7 Offset 56
- 3 years ago
Hi, Anonymous
You can try the following formula.Duplicate = VAR _dCount = COUNTROWS ( FILTER ( 'DB 15092022_1', 'DB 15092022_1'[STO Number] = EARLIER ( 'DB 15092022_1'[STO Number] ) && 'DB 15092022_1'[Index] <= EARLIER ( 'DB 15092022_1'[Index] ) ) ) RETURN IF ( _dCount > 1, 1, 0 )If you have a large amount of data, you can try to calculate with measure.
Measure:Duplicate = VAR _dCount = COUNTROWS ( FILTER ( ALL ( 'DB 15092022_1' ), 'DB 15092022_1'[STO Number] = SELECTEDVALUE ( 'DB 15092022_1'[STO Number] ) && 'DB 15092022_1'[Index] <= SELECTEDVALUE ( 'DB 15092022_1'[Index] ) ) ) RETURN IF ( _dCount > 1, 1, 0 )Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, Anonymous
You can try the following formula.
Duplicate =
VAR _dCount =
COUNTROWS (
FILTER (
'DB 15092022_1',
'DB 15092022_1'[STO Number] = EARLIER ( 'DB 15092022_1'[STO Number] )
&& 'DB 15092022_1'[Index] <= EARLIER ( 'DB 15092022_1'[Index] )
)
)
RETURN
IF ( _dCount > 1, 1, 0 )
If you have a large amount of data, you can try to calculate with measure.
Measure:
Duplicate =
VAR _dCount =
COUNTROWS (
FILTER (
ALL ( 'DB 15092022_1' ),
'DB 15092022_1'[STO Number] = SELECTEDVALUE ( 'DB 15092022_1'[STO Number] )
&& 'DB 15092022_1'[Index] <= SELECTEDVALUE ( 'DB 15092022_1'[Index] )
)
)
RETURN
IF ( _dCount > 1, 1, 0 )
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you so much for the solution.
By using Measure i got the output
but one more issue is that from the output i need to take the sum of 0,1
i am not able to perform the sum on the measure.
to calculate SUM i need to use column right. but with measure i am not able to calculate SUM of 0's & 1's
Any suggesstions please?
Thanks