Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
jamiemcc
Contributor III
Contributor III

How Do i get the Max Year and Max Week on my set chart

Hi Guys, 

For My chart I can Only see Week 51 as it thinks week 52 is max week.

How do i Include 2020 as Max year and Week. The Below gets the Max Week -1.

 

Sum({<DailyTaskType = {'Counts'}, Week = {"$(=Max(Week)-1)"}>} EstimatedTaskTime*Tasks)

 

Here is my Set analysis.

 

Thanks Jamie

Labels (1)
2 Replies
Anil_Babu_Samineni

Perhaps this

Sum({<DailyTaskType = {'Counts'}, Year={"$(=Max(Year))"}, Week = {"$(=Max(Week)-1)"}>} EstimatedTaskTime*Tasks)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Kushal_Chawda

if you have a Year field in your data then you can use below expression

Sum({<DailyTaskType = {'Counts'}, Year ={"$(=max(Year))"},Week = {"$(=Max(Week)-1)"}>} EstimatedTaskTime*Tasks)

If you dont have Year field, you can create it in script using your Date field like below and use the above expression

LOAD *,year(DateField) as Year