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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

List dimension based on expression values

Hi,

I'm running into a bit of a snag, because I'm trying to create some dimension values based on expression values.  I have a straight table where I've added an expression (labeled as Bucket) which contains the following nested formula:

if(Age<=0,'Current',if(Age>=1 and Age<16,'1 - 15',if(Age>=16 and Age<31,'16 - 30',if(Age>=31 and Age<61,'31 - 60',if(Age>=61 and Age<91,'61 - 90',if(Age>=91 and Age<121,'91 - 120',if(Age>=121 and Age<151,'121 - 150',if(Age>=151 and Age<181,'151 - 180','180 +'))))))))

You're probably wondering why I have a nested formula in my straight table.  It's because Age is an expression field within the straight table that is calculated after plugging in a date into an input box.  I'm unable to include this date field in the load script due to the date changing based on the data source as of date.

So...back to my question.

How can I create a list table which has a dimension that produces the following values to help me filter my straight table.  I'd also like to include an expression field in the list table to calculate the sums of the dimension values.

Current

1 - 15

16 - 30

31 - 60

61 - 90

91 - 120

121 - 150

151 - 180

180 +

11 Replies
chetansehgal
Creator
Creator

By source file name means the file in which you are doing all this stuff or it is a filename of another qvw file?

Not applicable
Author

By source file name, I meant the file which is used in the load script, the FROM file.  If I could add a date into the filename which is used in the load script to determine the "as of date" of the data.