Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to group dimension based on criteria

Hello gyes,

In a dashboard, I was asked to make a bar chart where to calculate the percentage of clients who visited my our stores at least once a week, monthly, or once every 3 months.

Something like this:

Basically, in terms of data, I have a table with all my clients (ID, Name, Subscribtion_date,...) and a table with all the transaction (TransID, Store, Client_ID, Product, Quantity, Value, Date).

Maybe the title of this question is not correct but I dont know exactly what to ask.

Can you please help me how to build the chart I want?

Thanks in advance,

Miguel Cunha

1 Solution

Accepted Solutions
shraddha_g
Partner - Master III
Partner - Master III

In Dimension,

Valuelist('Weekly','Monthly','Every 3 Months')

In Expression,

Pick(Wildmatch(Valuelist('Weekly','Monthly','Every 3 Months'),'Weekly','Monthly','Every 3 Months'),

Expression for Weekly,

Expression for Monthly,

Expression for Every 3 Months

)

In Color by Expression,

Pick(Valuelist('Weekly','Monthly','Every 3 Months'),'Weekly','Monthly','Every 3 Months'),

green(),

yellow(),

red()

)

View solution in original post

4 Replies
shraddha_g
Partner - Master III
Partner - Master III

Create a Synthetic dimension using Valuelist()

or you can create a inline table in script with these values and use that field as dimension in chart.

For any issues share a sample data so that can help you in better way.

Anonymous
Not applicable
Author

First of all, thanks for your answer.

I searched some discussions about Synthetic Dimensions but I dont understand how to aplly it in my case.

Can you please help me out a little more? What extra information do you need?

Thank you once again!

shraddha_g
Partner - Master III
Partner - Master III

In Dimension,

Valuelist('Weekly','Monthly','Every 3 Months')

In Expression,

Pick(Wildmatch(Valuelist('Weekly','Monthly','Every 3 Months'),'Weekly','Monthly','Every 3 Months'),

Expression for Weekly,

Expression for Monthly,

Expression for Every 3 Months

)

In Color by Expression,

Pick(Valuelist('Weekly','Monthly','Every 3 Months'),'Weekly','Monthly','Every 3 Months'),

green(),

yellow(),

red()

)

Anonymous
Not applicable
Author

Thank you very much Shraddha!

You saved my day