6 Replies Latest reply on Jun 24, 2016 10:02 AM by madhuri.tanniru

# How to computer 1 dimension with 2 filters

Hi

I need to computer Capacity and Usage. I need to subtract Capacity and Usage to have the Difference of each column.

any Idea on this? I've been searching the forum

Thank you

filter:::

Metric Name: Disk Space Capacity && Disk Space Usage

Object Name : Datasource

• ###### 1. Re: How to computer 1 dimension with 2 filters

Hi Lawarence,

Are you looking for the following

If so, you can add a calculated field : SUM([Capacity]) - SUM([[Disk Space Usage])

Hope this helps!

Thanks,

• ###### 2. Re: How to computer 1 dimension with 2 filters

Hi

But my "Disk Space Capacity" and "Disk Space Usage" are just one in a dimensions which is "Metric Name". how do you like grab those "Disk Space Capacity" and "Disk Space Usage" to make like yours?

Thank you

• ###### 3. Re: How to computer 1 dimension with 2 filters

Hi Lawrence,

I have come with the following solution, please see if this is what you are looking for

I have taken the following as my data source

And the following view is built in Tableau

The following calculated fields were added

[UniqueIdentifier] = [Object Name]+[Category]

[CapacityValues] =

IF ATTR([UniqueIdentifier]) = ATTR([Object Name])+"Capacity" then SUM([Values])

ELSE 0 END

[DiskSpaceUsageValues] =

IF ATTR([UniqueIdentifier]) = ATTR([Object Name])+"DiskSpaceUsage" then SUM([Values])

ELSE 0 END

[Difference] =  IFNULL(-([CapacityValues]+[DiskSpaceUsageValues]),0)

Table Calculation ( applied on the field Difference)

Hope this helps!

Thanks,

• ###### 4. Re: How to computer 1 dimension with 2 filters

Thanks,

• ###### 5. Re: How to computer 1 dimension with 2 filters

Hi

Thank you for your help. You gave me ideas!

I duplicated the measure so i have measure for capacity and used

drag the measure names on the column

and drag measure values on Marks on label

create 2 calculated field.

calculatedfield1:

IF [dimension] = (Capacity) then [measure] end

calculatedfield2:

IF [dimension] = (used) then [measure2] end

Thank you,

Lawrence