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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis Help

Hi,

I have the following expression :

num(sum({<MonthYear={'$(=date(monthstart(max(MonthYear)), 'MMM-YY'))'}>}Number)/sum({<MonthYear={'$(=date(monthstart(max(MonthYear)), 'MMM-YY'))'}>}[Line Total]),'#,###.0%')

I would like to only calculate where the field included_in_analysis='Y' - can anyone advise how can can add this into the above expression please?

Many thanks for you time.

Labels (1)
2 Replies
Not applicable
Author

Hi,

num(sum({<MonthYear={'$(=date(monthstart(max(MonthYear)), 'MMM-YY'))'},  included_in_analysis= {'Y'}>}Number)/sum({<MonthYear={'$(=date(monthstart(max(MonthYear)), 'MMM-YY'))'}, included_in_analysis= {'Y'} >}[Line Total]),'#,###.0%')

Not applicable
Author

if(included_in_analysis='Y',num(sum({<MonthYear={'$(=date(monthstart(max(MonthYear)), 'MMM-YY'))'}>}Number)/sum({<MonthYear={'$(=date(monthstart(max(MonthYear)), 'MMM-YY'))'}>}[Line Total]),'#,###.0%'))