Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Bar Chart Dimension Issue

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) :

Capture.PNG

However my chart shows just the result of the MaJ selected:

Capture.PNG

(Here "STEASoF" = "MaJ")

The dimension:

Capture.PNG

And the Expression looks like:

Capture.PNG

Do you have an idea ?

Thanks for advance for your help,

Cocalero.

35 Replies
swuehl
MVP
MVP

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.

sunny_talwar

Why don't you try this:

=SUM({$<Job_Titles = {'Trader'}, STEAsOf = {">=$(=Num(MonthStart(Max(STEAsOf), -12))<=$(=Num(Max(STEAsOf))"}>} STE)

swuehl
MVP
MVP

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).

Anonymous
Not applicable
Author

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: Capture.PNG

But when i choose another date, the first date still is 29/02/06 and not the current selection:

Capture.PNG

The expression is:

=SUM({$<Job_Titles = {'Trader'}, STEAsOf = {">=$(=Num(AddMonths(Max(STEAsOf),-11))-5)<=$(=Date(STEAsOf, 'DD/MM/YYYY'))"}>} STE)

Thanks in advance

swuehl
MVP
MVP

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...

Anonymous
Not applicable
Author

So sorry i lost it 😕

Thanks a lot for all your returns !