Qlik Community

Qlik Sense Cloud Discussions

Announcements
Announcement: Certain actions are currently causing a Page Not Found error. This is a known issue and we are working with the platform vendor to investigate and resolve it.
ketanvaria
New Contributor III

Limiting a chart to just show 2018

 

I have created a simple chart - but I want to limit it to show 2018 values only. I tried 'messing about' with expressions but to no avail! please help! 

5 Replies
Partner
Partner

Re: Limiting a chart to just show 2018

Hello,

 

in the expresion, it has to do set analysis:

sum({$<Year={'2018'}>}Measure) or 

sum({$<Year={"$(=Max(Year))"}>}Measure) to automate the field selection

Bye

Highlighted
ketanvaria
New Contributor III

Re: Limiting a chart to just show 2018

=sum({$<Year={'2017'}>}[Month_Year.autoCalendar.Year])

My date field name is Month_Year - I tried the above but got 

 


@jsaintmaxent wrote:

Hello,

 

in the expresion, it has to do set analysis:

sum({$<Year={'2018'}>}Measure) or 

sum({$<Year={"$(=Max(Year))"}>}Measure) to automate the field selection

Bye


 

Partner
Partner

Re: Limiting a chart to just show 2018

if your field is [Month_Year.autoCalendar.Year], you have values like 2017, 2018, etc right?

So if it's true, try:

sum({$<[Month_Year.autoCalendar.Year]={'2017'}>}Amount)

Amount=your measure

bye

ketanvaria
New Contributor III

Re: Limiting a chart to just show 2018

That works I had to put the expression in the measures field not the dimensions field

Partner
Partner

Re: Limiting a chart to just show 2018

Yes expressions are in measure not dimension.
When you are agrégation like count sum or set analysis, you put expression in the filed measure.
Bye