Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am a beginner on QlikView, and i would to create a chart which shows the result of the 12 last "MaJ" from the "Maj" Selected (1 year period from the Maj selected) :
However my chart shows just the result of the MaJ selected:
(Here "STEASoF" = "MaJ")
The dimension:
And the Expression looks like:
Do you have an idea ?
Thanks for advance for your help,
Cocalero.
Yep, that's confusing.
Sebastien, you need to decide if you want to create a set expression based on a date range (then see above, maybe adding some days to the lower limit to allow for few days changing in month end dates, like
=NUM(AddMonths(Max(AsOf),-1)) -5
Note that the set modifier is using >=, so it catches all dates that are larger than the specified date)
Or you want to select based on the number of field values, then I would suggest creating another field as indicated in my previous answer.
Why don't you try this:
=SUM({$<Job_Titles = {'Trader'}, STEAsOf = {">=$(=Num(MonthStart(Max(STEAsOf), -12))<=$(=Num(Max(STEAsOf))"}>} STE)
Right, that would be a better solution than subtracting just a constant 5, assuming that you only have one STEAsOf value per month (or again, you need to decide what you actually want to show in your chart).
Ok, i want to create a set expression based on a date range.
However a issue is still here:
- For the newest date, the chart is ok:
But when i choose another date, the first date still is 29/02/06 and not the current selection:
The expression is:
=SUM({$<Job_Titles = {'Trader'}, STEAsOf = {">=$(=Num(AddMonths(Max(STEAsOf),-11))-5)<=$(=Date(STEAsOf, 'DD/MM/YYYY'))"}>} STE)
Thanks in advance
swuehl wrote:
Well, you can create another field in your script that just enumerates the field values in chronological order.
Then use the set modifier on that field (and clear selections on the other calendar field).
But I think your issue in above sample is that your upper limit is still formatted as date, use the num() function also on the upper limit.
=SUM({$<Job_Titles = {'Trader'}, STEAsOf = {">=$(=Num(AddMonths(Max(STEAsOf),-12)))<=$(=Num(Max(STEAsOf)))"}>} STE)
Just in case my previous answer got lost...
So sorry i lost it 😕
Thanks a lot for all your returns !