Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a chart that has the dimension weeks in a month (Week1, Week2, Week3 and Week4), need to get the last value that occurred each week, for that I am using the function below in the script:
num (WeekDay (Table.Date)) + 1 the WeekDay,
In one case I have the following scenario:
Week 1 - Last Occurrence: Sixth day of the week
Week 2 - Last Occurrence: Seventh day of the week
Week 3 - Last Occurrence: Seventh day of the week
Week 4 - Last Occurrence: Fifth day of the week
When I do the following formula in the chart:
Sum({<Table.WeekDay= {$(=Max(Tabe.WeekDay))}>} Table.Value)
By doing this only the values of weeks two and three appears, for these contain values on the seventh day of the week, I need to make it appear weeks 1 and 4, with the values of the sixth and fifth day, respectively, does anyone know how to do this set analysis or otherwise?
Thank you.
I think you need to have QlikView evaluate each week separately because the last day of the week is different. Try using Aggr across each week.
Something like this:
Sum(Aggr(Sum({<Table.WeekDay= {$(=Max(Tabe.WeekDay))}>} Table.Value),WeekofMonth))
Still show only the week 2 and 3 with Aggr...
If you have only one value per day you can try this: firstsortedvalue(Table.Value,-Table.Weekday)
no value appears with this function