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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Stars
Creator
Creator

Stop a Fractile from Filtering

I want to add fractiles (preferably as limits on a gauge, but reference lines would be okay too).

I can do this with simple data, but not when I make things more complex. 

This works:
=fractile({$<Question={"Cat1"},Company>}Response,0.75)

This doesn't:
=fractile((max( {<Year = {"2019"},Company>}
Aggr(((Sum({1<Question={'Cat1'},Company>}Response)))
/(Sum({1<Question={'Cat2','Cat3','Cat4'},Company>}Response))
,Company,Year))),0.50)

My error message says I can't have nested aggr functions.  If I remove the first part of my expression (first line of the above), it gets rid of the error messages and accepts the expression, but when I filter my data based on a company, the fractile changes.  I can successfully specify the min and max on my gauge using the above equation, but not the fractiles. 

Any suggestions about what I'm doing wrong?

1 Solution

Accepted Solutions
sunny_talwar

May be try this

=Fractile({<Year = {"2019"}, Company>} Aggr(
	Sum({1<Question = {'Cat1'}, Company>}Response)/Sum({1<Question = {'Cat2','Cat3','Cat4'}, Company>} Response)
, Company, Year), 0.50)

 

View solution in original post

1 Reply
sunny_talwar

May be try this

=Fractile({<Year = {"2019"}, Company>} Aggr(
	Sum({1<Question = {'Cat1'}, Company>}Response)/Sum({1<Question = {'Cat2','Cat3','Cat4'}, Company>} Response)
, Company, Year), 0.50)