
1. Re: How to only display lines that meet some conditions
swaroop.gantela Jun 28, 2018 8:12 PM (in response to kerine.taylor)Kerine,
I'm not sure if this got there, but maybe it can give an idea.
Basically, if any of your criteria are met, then flag with a 1.Add up those flags for the whole ID, and if greater than 0,
put that in your Target group:
IF WINDOW_SUM(
IF SUM([Shipped Units])>10
OR
([Variance to LW]<2
OR
[Variance to 4 wks ago]<10)
THEN 1 ELSE 0 END)
>0 THEN "Target"
ELSE "Non Target"
END
This has a compute using of all Specific Dimensions, restarting every [ID].
All nested calculations are computed "Table Across"
Please see workbook attached in the Forum Thread.

274394target.twbx 318.1 KB


2. Re: How to only display lines that meet some conditions
kerine.taylor Jun 29, 2018 4:52 AM (in response to swaroop.gantela)Hi Swaroop,
Thanks for this, I've made some adjustments to the target calculation and I feel like I'm getting closer. My only question would be is there a way I can only apply that calculation to the latest week. For example in the attached workbook for Week 25 only the top 3 lines would meet the condition of the target calculation. I think at the moment it groups them as target if they have ever met the conditions which would mean when we review say at the end of the year the list will be long because many lines may have met the conditions at some point.
Thanks
Kerine

274394target (1).twbx 277.9 KB


3. Re: How to only display lines that meet some conditions
swaroop.gantela Jun 29, 2018 10:26 PM (in response to kerine.taylor)Kerine,
You could try adding in a Latest Week Boolean:
[Date (Week numbers)]={MAX([Date (Week numbers)])}
// where [Date (Week numbers)] was created using Custom Dates
Then the [Target] calculated field would become:
IF WINDOW_SUM(
IF ATTR([Latest Week Boolean]) AND
SUM([Shipped Units])>=5
AND
([Variance to LW]<2
OR
[Variance to 4 wks ago]<10)
THEN 1 ELSE 0 END)
>0 THEN "Target"
ELSE "Non Target"
END
Please see workbook attached in Forum Thread.

274394target2.twbx 255.5 KB


4. Re: How to only display lines that meet some conditions
kerine.taylor Jul 2, 2018 7:15 AM (in response to swaroop.gantela)Thank you Swaroop that worked.