Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How do I get the current MonthYear on a chart?

I attended the Qlikview developer training last week and have been having a play with the file we created. However I am having trouble trying to get the current MonthYear on a chart.

We added the master calendar at the training so the script should be ok.

I can get it to work for just the year, so if I use the expression:

sum({$<Year = {$(=max(Year))}>}LineSalesAmount)

it works fine.

However if I use the expression:

sum({$<MonthYear = {$(=max(MonthYear))}>}LineSalesAmount)

then the chart goes blank.

What am I doing wrong?

1 Solution

Accepted Solutions
giakoum
Partner - Master II
Partner - Master II

It does return values. See attached, green column in chart

View solution in original post

7 Replies
Not applicable
Author

Hi

Send me the Sample Application

Not applicable
Author

Here it is, it's the same one they use at the training.

Not applicable
Author

Anybody?

I would have thought this would be quite simple.

giakoum
Partner - Master II
Partner - Master II

Year is a number, MonthYear is not.

So you need to use single quotes to make it work :

sum({$<MonthYear = {'$(=max(MonthYear))'}>}LineSalesAmount)

Double qoutes also work as QlikView consideres it as a search.

Not applicable
Author

Thank you for responding Ioannis.

However, the expression you gave still returns a blank and if I use double quotes instead it also returns a blank.

giakoum
Partner - Master II
Partner - Master II

It does return values. See attached, green column in chart

Not applicable
Author

Sorry Ioannis, not sure what I did to make it not work but can see it does now.

Thanks a lot for your help