7 Replies Latest reply on Jan 24, 2019 6:37 AM by Paul Wachtler

# sum related dimension and fix it

hi mates,

I have a table like that :

cityperson
monthsales
parisperson12018125
parisperson12018124
parisperson12018113
parisperson42018102
newyorkperson52018102

I want to see the SUM (SALES) OF CITY

but I will filter it with PERSON

Ex :

When I select Person1, I want to see the SUM OF SALES OF PARIS  =5 +4+3 = 12

(not 5)

Because the CITY of the PERSON1 is PARIS and I want to see its CITY results when I select PERSON1.

The final result I want to see after that selection is :

citymonth
sales
paris2018129
paris2018113
paris2018102

thanks for helps!

• ###### 1. Re: sum related dimension and fix it

In Tableau this is simple, put City, Month and SUM(Sales) on the sheet the way you want.  Put Person on the filter shelf and choose person1.  You will get exactly what you're looking for (well, not paris 201810 because that's person4 not person1)

• ###### 2. Re: sum related dimension and fix it

well I know that but that is not what I want. When I do it like that it filters the numbers according to Person1.

I want to click the Person1 and want to see the CITY lookup  results. I need somth like a a FIXED LOOKUP solution I think.

• ###### 3. Re: sum related dimension and fix it

No need for an LOD to do this, see attached

• ###### 4. Re: sum related dimension and fix it

thanks for the file but ;

here in the file when I select the PERSON1, I want to see "all data of Paris", (not Person1 filtered)

(SO it should also show the 201810)

The thing I want to do is, to see the global CITY results of that Person. not filtered one.

My aim is to compare the CITY sales byterm, with Person1 sales byterm.

So I need all sales of CITY to compare it with Person1 Sales.

• ###### 5. Re: sum related dimension and fix it

Hi Firat,

Check out the attached dashboard.  I created a dashboard with two worksheets for this.  The first worksheet is simply a list of each person.  I included the "city" field on the detail mark so it's not included in the view but can be used in an action filter.  The second worksheet has the final view you're looking for.

In the dashboard, I included both worksheets, and set a filter action for the city field so that when a person is clicked, the corresponding city's values will show (and not filter on just that person).

Best,

Paul

• ###### 6. Re: sum related dimension and fix it

thanks for the answer! it seem useful but,

is there a way to solve this with CALCULATED FIELD?

bec. I want to use this fields in other calculations.

(also you have used person table with no sum field. when ı do it with detail-city it changes the view. (with bar chart)

Here I need 2 bar charts 1.person-sales    2.city-sales

And I want to see the city trend (unfiltered!) when I click the person of it.

• ###### 7. Re: sum related dimension and fix it

Hi Firat,

Now that you're asking for a bar chart view with a city trend, that's different than your initial question.  As you've already marked my previous answer as correct, I recommend posting a new question with the specific requirements that you'd like for your viz.  When you change requirements after your initial question, they tend to get lost in the forums.

Best,

Paul