4 Replies Latest reply on Aug 28, 2018 9:15 PM by weihua gao

# How to use one dimension value to filter another dimension value?

I am preparing the certification exam, one type of problem is always hard for me. for example: Find the total sales value for all product subcategories for customers who ordered office furnishings.

Any suggestions?

Thanks!

• ###### 1. Re: How to use one dimension value to filter another dimension value?

You don't need any calculation for this one if all you are looking for is total sales. Just drag the relevant fields to the view.

And this is how they are broken down by Segments.

However, if you need a calculated field, that will be.

[Office Furnishings Total Sales]

IF [Category] = 'Office Furnishings' THEN [Sales] END

• ###### 2. Re: How to use one dimension value to filter another dimension value?

Thanks, but I think the meaning of this question is the total sales ( including other subcategories). office furnishings is only a selection condition for the customer ID, when we got those ID, we can further calculate the total sales for them.

• ###### 3. Re: How to use one dimension value to filter another dimension value?

Apologies, I completely misread the question. There are several ways to solve this problem. You could use LOD but I will only suggest using LOD for the QA certification exam if that is the only option available. Most of the questions can be solved using simple concepts. I've used sets for the approach below.

Right click on Customer Name and select 'Create Set'.

Add this to the filter shelf and set to 'True'

See attached workbook.

Hope this helps.

Ossai

• ###### 4. Re: How to use one dimension value to filter another dimension value?

Thanks a lot! that is exactly what I want. Actually I see the using of Max

or min function in similar  situation, but I didn't get its realy meaning.

I'll do some search on this.

Thanks again!

Okechukwu Ossai <tableaucommunity@tableau.com> 于2018年8月28日周二 下午6:04写道：

Tableau Community Forums

How to use one dimension value to filter another dimension value?