Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

selected values on dimension and x-axis

Hi Qlikview experts,

I have a table that shows list of areas denoted by numbers (e.g. 1 to 200) and traffic performance for each area for selected day.

I'd like to show a simple table where dimension is only selected areas instead of all areas (e.g. only certain area numbers, let say 1,3,5,7,8,11, 25, 120, 156) and the expression is still the same (e.g traffic performance for each area for certain day).

What would be the right calculated dimensions for this type of table and chart?

My expression is something like this

sum({<Date={'20/07/2016'}>}FwdTraffic+ReturnTraffic)

I need a calculated dimension that only shows selected numbers.

Thanks for help.

10 Replies
sunny_talwar

May be I might be missing something, but I feel like QlikView would automatically restrict this particular expression to those areas because you have not ignored selection in area field. So no matter whatever dimension you want to look it based on, any selection in area field should change the result from this expression.

If you still not able to figure this out, would you be able to share a sample?

Anonymous
Not applicable
Author

Hi,

I know I can do this by simply selecting the desired values in the area field for the expression or restrict it when loading the table, but I'd like to create a straight table where the values are permanently filtered.

So the table that I'd like to have is simply the first column as a dimension with selected values of the area and the remaining columns are traffic performance for each day.

Any hint?

sunny_talwar

You can use a calculated dimension like this:

If(Match(area, 1, 3, 5, 7, 8, 11, 25, 120, 156), area) or

Aggr(Only({<area = {1, 3, 5, 7, 8, 11, 25, 120, 156}>} area), area)

or you can use set analysis:

Sum({<Date={'20/07/2016'}, area *= {1, 3, 5, 7, 8, 11, 25, 120, 156}>}FwdTraffic+ReturnTraffic) or

Sum({<Date={'20/07/2016'}, area = {1, 3, 5, 7, 8, 11, 25, 120, 156}>}FwdTraffic+ReturnTraffic)

maxgro
MVP
MVP

Another option is to add a flag field in the script to identify the 1,3,5,......156  areas and use that new flag in a simple set analysis expression (above all if use the same list of areas in many charts).

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

Another option is that you make the search dynamic.

For that you can create a variable and ask users to enter the values separated by comma.

Lets say you create variable vSearchArea

so your expression will be.

sum({<Date={'20/07/2016'},area = {"$(vSearchArea)"}>}FwdTraffic+ReturnTraffic)

This way the expression will dynamically shortlist the value which are entered by user.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
HirisH_V7
Master
Master

Hi,

May be like this,

=If(Area=1 and 3 and 5 and 7 and 8 and 11 and 25 and 120 and 156 ,Area)

Check suppress when value is null for dimension  & use your expression.

HTH,

Hirish

HirisH
“Aspire to Inspire before we Expire!”
sunny_talwar

I don't think this will work hirishv7‌. You will need to list out Area every time for different equality. I think that is why I feel Match or WildMatch would be better option here

If(Area = 1 or Area = 3 or Area = 5 or ...., Area)

HirisH_V7
Master
Master

Yup stalwar1‌ i agree with you but match or wild match also will direct to edit the Calculated Dimension when ever they need insert or delete area code. It will be a re-work right.

fikristar    I hope it will be better to  create a column in the script it self  like ' Status'  and specify the statuses of all area codes .Then area codes belong to particular status can be picked in a table.

-Hirish

HirisH
“Aspire to Inspire before we Expire!”
Anonymous
Not applicable
Author

Thank you!

Sent from my iPhone