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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to filter automatically a chart or table?

Hi,

I will like to display a chart for last 6 months, 12 months, 3 months, I have performed this manually:

=Count({$<YR_Cal={2016}, Month={">06"} >} AutoID)

Each month, I should update this expression. How can I update the expression to have the same result, each month automatically, I mean that I don't need to update the expression and it will be calculated automatically.

I have fields as YYYY-MM, Fiscal Year-Quarter (FYYYYY-Q#), created date (full date).

Thank's in advanced for your help.

26 Replies
sunny_talwar

In the script, you can do like this

LOAD Date(MonthStart(Date#(YRMON, 'YYYY-MM')), 'YYYY-MM') as YRMON

Anonymous
Not applicable
Author

How can I do something similar but by quarters, having the FYQTR with values as F2016-Q1?

sunny_talwar

Do what exactly? use it to create last 6 months or make it read as a date in QlikView?

Anonymous
Not applicable
Author

I have the following expression:

=Count({$<YR={2017}, QTR={">=01"} >}  AutoID)

In this example I stored the month and quarter in two different fields.

What I need is that always display the latest one, and in another chart the last 4 of them, the field is called FYQTR and the values are FY2016-Q1.

I have tried something like this to display the latest one:

=Count({1< FYQTR = {"$(=MaxString(FYQTR))"}>} AutoID)

But it's not working.

sunny_talwar

You only need the most recent fiscal quarter in this new chart?

Anonymous
Not applicable
Author

I need on chart for the most recent fiscal quarter and another chart for the last 4

sunny_talwar

I would use your date fields instead of quarter fields to get last 1 quarter. The reason I say is that is because dates in set analysis is already a little complicated and adding fiscal year field (which is most likely a text field) can complicate things. I would suggest you to look at this thread:

Dates in Set Analysis

If you still continue to have issue, I would suggest you to share a sample so that one of us can help you better.

Best,

Sunny

Anonymous
Not applicable
Author

I will take a look and if I have problems I will open a new post. Can you please tell me which would be the best way to call the highest FYQTR value as the =Count({1< FYQTR = {"$(=MaxString(FYQTR))"}>} AutoID) is not working?

sunny_talwar

This should have worked... can you check what you get when you just use this in a text box object

=MaxString(FYQTR)

Anonymous
Not applicable
Author

No data to display is the result of that.