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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Saryk
Partner - Creator II
Partner - Creator II

Filter by dimension

I'd like to add a filter by dimension instead of by value ; say I have field A {1, 2, 3} and field B {4, 5, 6} that correspond for example to number of sales for employee A and employee B or each product.

I want a pie chart with sales per product, so I have a dimension that is "Product name" and a measure that is Sum(A) + Sum(B).

If I add a filter item (the last one in graphs, I have Qliksense in French which doesn't help, sorry for mistranslations), I can only add a Dimension which then shows all values to filter by Value. 

I want to be able to select A or B to show their individual sales on the same chart, how can I filter this ?

Reality is more complex than that but the analogy simplifies things for explanation purposes.

28 Replies
cpomeren003
Partner - Creator II
Partner - Creator II

Well that was a wild ride. Glad it's solved!

Could you mark/like one of our answers with the formula's as the answer? That way people know which one to use in the future. 

Saryk
Partner - Creator II
Partner - Creator II
Author

I accepted the one with a working solution. 

 

Saryk
Partner - Creator II
Partner - Creator II
Author

One last thing :

Let's say the values for a sale are 18 and 12 for "A without B" and "B" respectively ; when I filter on those and mouse over the graph, it simply says "40" - that makes sense, we're adding them to "filter".

Is there a way ton conserve the split so that is shows "A without B : 18" and "B : 12" ?

Saryk
Partner - Creator II
Partner - Creator II
Author

30* it*

Typos, can't edit posts...

cpomeren003
Partner - Creator II
Partner - Creator II

You can actually edit posts by pressing the 3 dots.

I would solve your new problem by editing the label. So instead of Sales you get something like this:

Total Sales (15 product A, 10 product B): 25

Can basically make it as nice as you want, but as far as I know only on the label side, you can't really split the right side.

Saryk
Partner - Creator II
Partner - Creator II
Author

Would it be dynamic though ?

I don't have the 3 dots on my browser version ; I just noticed I do have them on my phone though.

cpomeren003
Partner - Creator II
Partner - Creator II

Yes, it would be dynamic, because it would be a formula that also gets calculated.

Saryk
Partner - Creator II
Partner - Creator II
Author

I shall check that out tomorrow 🙂

Saryk
Partner - Creator II
Partner - Creator II
Author

Could you help me doing this ?

My value fields appear as text in the label, like 

 

='A without B : [SaleProductAwB] B : [SaleProductB] C : [SaleProductC] D : [SaleProductD]'

 

will come out as 

 

A without B : [SaleProductAwB] B : [SaleProductB] C : [SaleProductC] D : [SaleProductD]

 

;

And if I remove them from the quotes like so :

 

='A without B : ' & [SaleProductAwB] & 'B : ' & [SaleProductB] & 'C : ' & [SaleProductC] & 'D : ' & [SaleProductD]

 

I get this in the label :

 

A without B : B : C : D :