4 Replies Latest reply on Oct 24, 2018 3:54 AM by NeedHelpThanks

# Calculations with Cubes

Good morning,

I am currently trying to build a tableau worksheet using a data cube. Unfortunately I am stuck with the following problem for quite some time.

I'm using a data cube that has two (relevant) dimensions for this issue. One contains the data types, the other one contains the time.

It basically looks like this:

Dimension Type:

Type A:      Subtype AA

Subtype AB

Type B:      Subtype BA

...

...

Dimension Time:

2017:

Q1:

Jan

...

...

...

Measures:

#exampleMeasure

I have figured out how to compare measures that differ in one (sub)-dimension.

But when I try to calculate the difference between the exampleMeasure of "Type A" "2017.Q1.Feb" and "Subtype BA" "2018" I can't get it to work.

Does someone have an idea how to solve this?

Best regards,

Moritz

• ###### 1. Re: Calculations with Cubes

Hi

I would like to share some knowledge from my experience working with cube datasource in tableau.

Working with cube datasource in tableau will have very limited features. We can't create aggregate calculations on tableau as the multidimensional cube is already aggregated data source.

I prefer you to go for secondary data source containing dates and do join with the cube datasource. Ex secondary datasource will have two columns date string and date value (Date string: 2017.FEB Date value: 01-02-2017)

To create calculations we should create a calculated member using MDX queries.

• ###### 2. Re: Calculations with Cubes

Hi Akram,

thank you for your response, but a secondary datasource is not an option, unfortunately.

• ###### 3. Re: Calculations with Cubes

Hi

Is this issue is been solved? Eager to know how you have solved the problem

• ###### 4. Re: Calculations with Cubes

Hi,

Unfortunately, the issue has not been solved.

I only found one workaround:

1. Create a calculated member like this (Pseudo-code):

SUM(IIF(Subtype AA & 2017, [Amount], NULL)) +

SUM(IIF(Subtype BA & 2018, [Amount], NULL))

2. Drop the calculated member as row/column