Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
Highlighted
varunreddy
Contributor III

Filter criteria

Hi all,

I have created the calculation dimension.

Calculation Used:

aggr(only({<[As of Date]={'$(vmaxweek)','$(vprevWeek)'}>}[As of Date]),[As of Date])

vmaxweek - =max({1<[Pull Type]= {'W'}>}[As of Date])

This always stores the latest available date

prevWeek - =max({<[As of Date] -= {'$(vmaxweek)'},[Pull Type]= {'W'}>}[As of Date] )

This will pick and store the date on selection and displays the previous date availbale for the most available date by default

When nothing is selected the report  is showing bars for latest date and the previous available date. The problem is, when I select the date filter, the bar is showing only one value. the bar is not showing latest date vailable.

Can anyone guide me through this process?

Thanks in advance!

Regards,

Varun

Tags (2)
1 Solution

Accepted Solutions

Re: Filter criteria

I guess you need to ignore selection in [As of Date] field in your expression using set analysis for this to work:

{<[As of Date]>}

UPDATE: The issue is that although your dimension wants to show two dates, your expression is only available for the selected date because it has not been told to not filter based on selection in date field. Once it is told to ignore selection, it will always display for all dates, but now the dimension won't let you see anything more than the two dates. I hope this make sense.

Best,

Sunny

View solution in original post

12 Replies

Re: Filter criteria

Try adding a one here:

Aggr(Only({1<[As of Date]={'$(vmaxweek)','$(vprevWeek)'}>}[As of Date]),[As of Date])

varunreddy
Contributor III

Re: Filter criteria

Sunny,

Tried this. Not working. Still ignorning vmaxweek

Re: Filter criteria

Is your As of Date field in Number format? The reason I asked this is because you are using Max() and haven't added the Date() function. May be you need to add Date() with the format to make it work?

Re: Filter criteria

I guess you need to ignore selection in [As of Date] field in your expression using set analysis for this to work:

{<[As of Date]>}

UPDATE: The issue is that although your dimension wants to show two dates, your expression is only available for the selected date because it has not been told to not filter based on selection in date field. Once it is told to ignore selection, it will always display for all dates, but now the dimension won't let you see anything more than the two dates. I hope this make sense.

Best,

Sunny

View solution in original post

varunreddy
Contributor III

Re: Filter criteria

Sunny,

Thanks. Ignoring selection in the expression worked. I was trying it with dimension, that might be the reason why it didn't work for me.

Cheers!

varunreddy
Contributor III

Re: Filter criteria

Sunny,

I am using three dimensions and I am able to see lable for first and third. I am unable to see second. Have you come across this situation?

Re: Filter criteria

Can you share a screenshot?

varunreddy
Contributor III

Re: Filter criteria

Actually I cannot share the screenshot.

If I select particular dimension (Primary) I am able to see secondary dimension. If I clear the selections I cannot see  the secondary dimensions.

Primary dimensions is shown 10 at a time using x-axis scroll bar. It has around 30 values.

Hope this helps.

I will try to send you screen shot with mock up data

Re: Filter criteria

Is Secondary dimension the Aggr() dimension or is it somehow dependent on the first one?