3 Replies Latest reply on Feb 6, 2013 6:22 AM by Joshua Milligan

# Calculation of a new characteristic of a dimension - measure variable to my selected existing characteristics

Hello Everybody

I have a question to you and hope, that anybody could help me:

Is it possible to calculate a new characteristic of a dimension, which is variable to my selected existing characteristics? Maybe this sounds a little bit confusing, but let me explain it with an example :

I have a dimension called « person » and a measure called « Ppints ».

Here are the persons with their points:

person a has 30 points

person b has 20 points

person c has 10 points

person d has 5 Points

I know that the total of points is « 100 », but the system doesn’t know this yet.

First of all I have to calculate a new characteristic of the dimension « person » called « other persons », so that I am able to say, what is the rest of the total.

Other Persons = Total - person A - person B – person C – person D

How can I do this ?

Then I have to say tableau, that the total sum of points is 100 – is this possible ?

After solving these problems – here is the next question:

Is it possible to calculate the „other persons“ in addiction to my ‘in Tableau’ selected persons?

dimension « person » – in rows

measure « points » – on columns

I have the dimension on my filter – when I select « person a and b », the « other persons » would be 50.

When I select only « person c », the « other persons » would be 90.

a.s.o.

Is this possible to program such a calculation ?

Thanks a lot,

Alexander

• ###### 1. Re: Calculation of a new characteristic of a dimension - measure variable to my selected existing characteristics

Alexander,

Please look at the attached workbook and see if it is what you are looking for.  I took what I feel is the easiest approach of making a couple of different visualizations and combining them on a dashboard.  The key to my approach was the use of a parameter (because you know what the total is, so this will let you enter the value) and a calculated field to come up with the difference.  I also used a global filter for person to answer the second part of your question.

There are other ways to solve this problem.  One approach would be to customize the grand total with a calculation to show you "others".  That would be a more complicated solution, but if you're interested or have any other questions as you look at this, please let me know.

Joshua

• ###### 2. Re: Calculation of a new characteristic of a dimension - measure variable to my selected existing characteristics

Hello Joshua

But is there also a way to create the „ohter persons“ as a new characteristic of the dimension « person » (not as a new dimension), so that I am able to select:

dimension „person“ (with their points) :

person a has 30 points

person b has 20 Points

person c has 10 Points

person d has 5 Points

other persons (100-sum of persons) – in this way it would be 35 points

Maybe this sounds a little bit complicated to create, isn’t it ?

Regards,

Alexander

• ###### 3. Re: Calculation of a new characteristic of a dimension - measure variable to my selected existing characteristics

Alexander,

I'll have to give it some thought, but I don't think it would be possible in this case, without adding some data at the source.  What is your data source? (is it the Excel document you originally posted?)  Would it be possible to add a row that was "Other Persons"?  Or maybe, your connection could be changed to a custom SQL that unioned in another "Other Persons" row.

If you happen to have a packaged workbook and a little more detail on your actual data source, I'd be happy to take a look!

Joshua