Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

using locked up listbox as "where" clause

I am trying to classify the products into two groups and visualize as in the chart its count of user sessions.

so for example, let's say there are 10 products. and users use the products and session logs are being created.

there are 3 products that are in group A and 7 products in group B.

I want to visualize the sum of all counts for session log and separate them into group A and group B as you see in the picture.

of course dimension is date.

I was thinking about bringing in product name column with two distinct names

<< in load script it will be

Product_Name as Product_Name_1

Product_Name as Product_Name_2>>

and create two list boxes. for example, exact same values in the list box but one list box will be named "Product_Name_1" and the other list box will be named "Product_Name_2". but I couldn't proceed any more than that.....

another method I could think of is creating a excel file with one column Product_Name and the other column Group A. and somehow import the excel file and concatenate it to the main table so that all the rows of the table of which Product name belongs to Group A will have GROUP A and all the rest will automatically get GROUP B. in that case I will just be able to put the Product Group column as dimension along with date and use count as expression.

Please help!

Thanks!

2 Replies
swuehl
MVP
MVP

Go for the second approach.

Create an Excel file (or INLINE table) with just Product Name and Group as fields and use this as mapping table:

GroupMap:

MAPPING

LOAD [Product Name], [Group]

FROM YourExcel.xls

(...);

MainTable:

LOAD

     [Product Name],

     Date,

     [User Name],

     ApplyMap('GroupMap', [Product Name], 'Default value, e.g. Group B') as [Group Name]

FROM YourTableSource;

Mapping … and not the geographical kind

Data Cleansing

Don't join - use Applymap instead

http://www.quickintelligence.co.uk/applymap-is-it-so-wrong/

Gysbert_Wassenaar

You could also let users define their own groups. You can find an example workbook here: Users can map/group dimensions at run-time!


talk is cheap, supply exceeds demand