Tableau: using calculated fields for filtering dimensions

25.9k views Asked by At

I am currently creating some dashboards in tableau and I am stuck at a point, I tried finding solutions online but no go. So I thought maybe I can ask you.

1)The data I am looking at shows customer purchase value per department.

2) So I am having 2 dimensions: ‘customer name’ and ‘department’, and 1 measure: ‘sales’

3) I created a calculated field which gives all the customers that have bought from a selected department. For eg. When I select Printers from a parameter field, I get all the customers that have bought printer.

4) Now my task is to find what else have these ‘printer customers’ bought, because a customer can buy from multiple departments.

My problem is I am not able to filter ‘customer name’ dimension so that it only shows the printer customers that I have calculated based on my parameter selection.

I would really appreciate if you can throw some light in the right direction.

2

There are 2 answers

0
Inox On

Well, actually you can do that.

Drag "Customer name" to filter. Select the "Condition" tab. Suppose your paramater is named "Chosen department". You could create a condition like:

SUM(IF [department] = [Chosen department] THEN 1 END) > 0

This will basically get all the clients that have at least 1 sale on that chosen department

0
Confused Mind On

You can create one more sheet which has Customer wise all the data and in the dashboard you can add both sheets and create an action filter. When you create a dashboard, under dashboard menu click on Actions -> Add action -> Filter. Select on which sheet you wanna click and which sheet needs to be updated and also select Run action on: Select.

So when you click on that particular customer in a department in one sheet it will show all the departments from which he has bought.

You can check about the filter actions in these links: http://onlinehelp.tableau.com/current/pro/desktop/en-us/actions_filter.html http://onlinehelp.tableau.com/current/pro/desktop/en-us/actions_filter.html