Forum Discussion
Last 5 years
- 4 years ago
Hi Syndicate_Admin ,
In the EjContable column of other IDs, are there also these numbers 52, 53, 54, 55, 56? If so, tweak your formula to:
% last 5 = VAR _max = MAX ( data[EjContable] ) VAR _min = _max - 4 RETURN CALCULATE ( [_participacion], FILTER ( ALLSELECTED ( data ), data[EjContable] >= _min && data[EjContable] <= _max ), REMOVEFILTERS ( data[EjContable] ) )In your formula, the ALL function take all ID into consideration, replace it to ALLSELECTED to try.
Best Regards,
Community Support Team _ kalyjIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Syndicate_Admin ,
In the EjContable column of other IDs, are there also these numbers 52, 53, 54, 55, 56? If so, tweak your formula to:
% last 5 =
VAR _max =
MAX ( data[EjContable] )
VAR _min = _max - 4
RETURN
CALCULATE (
[_participacion],
FILTER (
ALLSELECTED ( data ),
data[EjContable] >= _min
&& data[EjContable] <= _max
),
REMOVEFILTERS ( data[EjContable] )
)
In your formula, the ALL function take all ID into consideration, replace it to ALLSELECTED to try.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.