Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Last Month Label & Error Message

Hi,

How can I put an error message like "Please select Year and Month' to viiew this report"

And, how can I put the Label, "last month"

say for example, this month is Feb 2012, then last month is Jan 2012...

Please help me, im using Qlikview 11. Thanks.

Best Regards,

Bill

3 Replies
Not applicable
Author

Hi,

For an error message you can use an if statement like:

if(GetSelectedCount([Year Month]) >= 1, expression, 'Please select Year and Month to View this report")

And for labels you can use in the window title =max(Month) & ‘ ‘ & max(Year)

And if you want previous month or previous year you add -1 =(max(Month)-1) & ‘ ‘ & (max(Year)-1)

Not applicable
Author

Hi,

can u help?

Without selecting Year or Month, the chart did not display data...

and this is the expression

sum({$<Year = {$(=max(Year))}, MonthNum = {$(=max(MonthNum))}>}[Gross Purchase])

I already tried using Month = maxString(Month)

but still does not display... why? im using qlikview 11...

that report is This Month data

Not applicable
Author

Hi,

Can you send the .qvw? Or an example of what your data looks like? The set analysis looks correct.

When I have encountered that problem before the problem have been that my data have had more dates than I had data for. Example:

Year     Month     Sales

2012     1            20

2012     2            30

2012     3            40

2012     4       

2012     5

So the max date is May 2012 in the data, but since there's no sales for that month, it won't display any data.

What does the lable say for the max(month)?