Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
CezarioAbrantes
Contributor III
Contributor III

Filter in a dimension of a chart

I have created a dimension ('Rkg Rec Art 1') which filters the measures selecting the value '1' in the field 'Ranking Receita Artigo', as follows:

=Aggr(Only({<[Ranking Receita Artigo] = {'1'}>} [Artigo Completo]), [Artigo Completo])

It worked well in the tables, because I put 2 dimensions on them ('Ano-Mês' and 'Rkg Rec Art 1'), as you can see in the image "Table".

The problem is in the chart, where I can't put 2 dimensions as I've done in the tables. I tried to use the same idea to filter the field 'Ano Mês', using the expression below, but it didn't work, as you can see in the image "Chart".

=Aggr(Only({<[Ranking Receita Artigo] = {'1'}>} [Ano-Mês]), [Ano-Mês])

So how can I filter this dimension in the chart? Or is there another possibility that I don't know?

Thanks!

23 Replies
lorenzoconforti
Specialist II
Specialist II

Also, the Excel file seems incorrect. When I try to reload a field is missing ("estado"); so can't really try fixing the sorting issue

CezarioAbrantes
Contributor III
Contributor III
Author

Lorenzo, I'm sorry again for the file. The problem is that my original file has 115 MB and it is not possible to upload it, so I need to reduce the number of data. Sometimes  I do some changes and forget do apply them in the "file 2". Now I've tried this file in my script and seems to be everything OK. Just reminding, the problem of sorting is in the chat of tab "Margem Raia Drogasil" (highlighet in the image attached).

Now, about this: Please note that, for this to work in other charts of your dashboard, you will need to implement the dimensions there too (i.e. not to use the many measures you were using before).

I understood that you are recommending me to use only crosstables instead many measures. But tell me: will I need to create one crosstable (CT) for every kind of analysis that I wanna do? For example: I've needed to create one CT to link Artigo x Ano Mês and one to link Cliente x Ano Mês. If I wanna link Artigo x Cliente, Cliente x Família, etc, will I need to create one CT for every link? I'm asking this because I've noted that the data-reading takes much more time when I add one CT.

Thank you!

P.S: Because of your name, I think you are Italian or have family there. I really hope all of them are safe this moment that is the worst we could pass through. We pray for Italy.

lorenzoconforti
Specialist II
Specialist II

I haven't managed to get the sorting to work; regarding loading time and the other cross table, you need to properly structure your data. As it stands now it is inefficient and probably not fit for purpose; it also seems you need to develop a number of visualisations so it would be best to handle it properly. Any of your colleagues can help you?

CezarioAbrantes
Contributor III
Contributor III
Author

Lorenzo, I have answered on Linkedin.