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: 
msawyercke
Creator
Creator

Expression question

I’m creating a new table and need some basic assistance with a particular formula.

I have a file that I load that contains all our locations (identified our unique "PS #") and their associated trailing 13 period sales.  In a table, I’m trying to display the count of restaurants that are under $800,000, between $800,001 and $1,100,000 and above $1,100,001.

I tried using this formula for the 'Under $800k' category, but there is an error and it won’t calculate:

Count(DISTINCT {< ([Trailing 13]< 800000) >} [PS #])

Can someone advise a better formula to use in the table?  What would be the other two formulas?

Thanks to anyone who can help!  

1 Solution

Accepted Solutions
Ivan_Bozov
Luminary
Luminary

Try this:

COUNT({<[Trailing 13]={"<800000"}>}DISTINCT [PS #])

vizmind.eu

View solution in original post

5 Replies
Ivan_Bozov
Luminary
Luminary

Try this:

COUNT({<[Trailing 13]={"<800000"}>}DISTINCT [PS #])

vizmind.eu
msawyercke
Creator
Creator
Author

Thanks, Ivan!

What would be the expression for 'between 800000 and 1100000'?

Ivan_Bozov
Luminary
Luminary

This should work: COUNT({<[Trailing 13]={">=800000<1100000"}>}DISTINCT [PS #])

vizmind.eu
msawyercke
Creator
Creator
Author

Outstanding and terrific - thanks very much!  Have a great day!

Ivan_Bozov
Luminary
Luminary

No worries. Same to you!

vizmind.eu