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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
safik003
Contributor III
Contributor III

How to select multiple field values based on a single selection from the same field in Pivot table

I have a table which contains the fields "Produt No", "Product Name" , "Sales Date", "Warranty Period". I have created a pivot table with all the fields. A file is uploaded for details. These are my data:

Sales:

LOAD * INLINE [
Produt No, Product Name, Sales Date, Warranty Period
1, Apple Phone, 2/1/2018, 1 yr
2, Apple iPad, 5/12/2017, 1 yr
3, Apple Laptop, 6/7/2018, 2 yr
4, HP Laptop, 6/10/2016, 1 yr
5, Samsung Phone, 7/2/2017, 1 yr
6, Samsung TV, 5/4/2018, 2 yr
7, Samsung Laptop, 3/1/2017, 3 yr
8, Lenovo Lap, 1/2/2016, 1 yr
9, Lenovo Phone, 5/6/2018, 3 yr
10, Nokia, 5/5/2017, 2 yr
];

Data are shown in Pivot table looks like below. I have a filter "Product No", my question is if a user wants to select a value  from Product No, three values(Previous value, Selected Value, Next Value) will be shown in the pivot table say if the user select value "4" from Product No, data for Product No 3,4 and 5 will be shown in the pivot table like below:

                            

Produt No                   3                                  4                             5

Product Name           Apple Laptop        HP Laptop          Samsung Phone

Sales Date                   6/7/2018                  6/10/2016           7/2/2017

Warranty Period        2 yr                            1 yr                        1 yr

 

Is there any way to do it? Need help urgently. Thanks a lot in advance.

Labels (1)
26 Replies
safik003
Contributor III
Contributor III
Author

Yes.Correct. You are absolutely right, in my example product name changes with every product no but in some cases the product name changes rarely, in that case I need to highlight the change value.Attached the file where product name rarely changes, how can I highlight this?

sunny_talwar

Something like this?

Capture.PNG

Expression used for background color for the expression

If(Only({<[Produt No] = {"$(=Max([Produt No]))", "$(=Max([Produt No])-1)", "$(=Max([Produt No])+1)"}>}[Product Name])
<>
Before(TOTAL Only({<[Produt No] = {"$(=Max([Produt No]))", "$(=Max([Produt No])-1)", "$(=Max([Produt No])+1)"}>}[Product Name]))
and ColumnNo(TOTAL) > 1, Red())
safik003
Contributor III
Contributor III
Author

You are almost there but instead of highlighting the expression total, Can't I just highlight the product name i.e the change product name "Samsung Phone"? Hope you got my point.

sunny_talwar

Use the same expression in dimension's background color expression 🙂

Capture.PNG

safik003
Contributor III
Contributor III
Author

Genius, you are. Many thanks.
safik003
Contributor III
Contributor III
Author

Hi,

Whenever the product name is changing from Apple to Samsung or other value. The color feature is not working. Can you please make it more dynamic? It needs to highlight the change of values of "Product Name" dimension. Thanks.

 

sunny_talwar

Make it more dynamic? I am not sure I understand what isn't changing colors? Can you attach a sample with some images showing the issue from the sample?
safik003
Contributor III
Contributor III
Author

Yes. whenever I try to implement the expression in my actual dashboard. Sometimes it's giving unusual output like if product name changes from "Apple" to "Apple then " Samsung" it's highlighting the "Apple", not "Samsung". I want highlight the value after the change value of Product Name.Hope you got it
safik003
Contributor III
Contributor III
Author

One point to add. when the value isn't changing like Product Name is always "Apple" then also it's highlighting one "Apple" Value.
sunny_talwar

I won't know until I see it.