Skip to main content
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)
3 Solutions

Accepted Solutions
sunny_talwar

Change your expression for Blank to this

Concat({<[Produt No] = {"$(=Max([Produt No]))", "$(=Max([Produt No])-1)", "$(=Max([Produt No])+1)"}>}'')

Capture.PNG

View solution in original post

sunny_talwar

Try that in that case

Concat({1<[Produt No] = {"$(=Max([Produt No]))", "$(=Max([Produt No])-1)", "$(=Max([Produt No])+1)"}>}'')

View solution in original post

sunny_talwar

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

Capture.PNG

View solution in original post

26 Replies
sunny_talwar

Change your expression for Blank to this

Concat({<[Produt No] = {"$(=Max([Produt No]))", "$(=Max([Produt No])-1)", "$(=Max([Produt No])+1)"}>}'')

Capture.PNG

safik003
Contributor III
Contributor III
Author

It's great. Really appreciate your effort. But whenever I try to select any value from different list box. The values in pivot table is getting restricted i.e instead of showing three values, it's showing the selected values. Isn't there anyway to select the value from multiple list boxes  and still three values will be shown in the pivot table? Check the attached file for your reference. Thanks

sunny_talwar

Try that in that case

Concat({1<[Produt No] = {"$(=Max([Produt No]))", "$(=Max([Produt No])-1)", "$(=Max([Produt No])+1)"}>}'')
safik003
Contributor III
Contributor III
Author

Many thanks. Now it's working perfectly.
sunny_talwar

Awesome!!
safik003
Contributor III
Contributor III
Author

One more help is needed. How can I highlight the changes value in pivot table? For example,for product no "3" the product name is apple but for product no "4" it's Samsung. How can I highlight this change?
sunny_talwar

Highlight how? I am not sure how you want to show it in your chart?
safik003
Contributor III
Contributor III
Author

User wants that feature.in max cases the product name remains same,if suddenly it changes in the pivot table,we need to highlight this. Isn't there any expression for it? If the value changes we will put a color on it. Isn't it possible?
sunny_talwar

But in your example.... the Product Name always change with Produt No and it sort of makes sense (because each Product Name is associated with a different Produt No).... then will you always see everything highlighted?

 

Capture.PNG