Dataset Description:

Columns: Brand, Market and Target.

Following dataset represent the target for four different brands A,B, C & D which are distributed among OPL & CPL market.

Sum of Target for each of Brand at OPL (highlighted in orange) and sum of Target for each of Brand at CPL (highlighted in yellow)

For example,

sum for OPL should be 10000 + 7000 + 4000 + 9000 = 30000 and,

sum for CPL should be 5000 + 2000 + 8000 + 3000 = 18000

What I did?

I used this logic: IF [Market] = 'OPL' THEN {FIXED [Brand]+[Market] : MIN([Target])} END

Image as below: The logic gave me total of target at OPL which is 58000,( which is not the one I wanted).

Can someone help me with the calculation part? May 8, 2018 in Tableau 7,299 views

## 2 answers to this question.

```SUM( { FIXED [Brand], [Market]: AVG(Target) } )
```

Performing average within each Market and Brand will eliminate the duplicates in your sum. answered May 9, 2018 by
• 10,230 points
How can we find distinct sum for actian vector datasource?
we can find distinct sum using LOD in Tableau (works for all versions after 9.0)

However, according to Data Constraints, Action Vectors aren't supported by LOD in Tableau
I feel the easiest way is to apply filter based on 'Market' , then get the respective sum. answered Aug 26, 2020 by Dhiraj Kumar Sahu

## In Tableau, How to sum the last 7 days of the value?

It can be achieved easily by creating ...READ MORE

## Sum Filtered Data in Tableau

Hi Anitha, Its quite simple, To use a ...READ MORE

## Sum two columns together in Tableau

Hi Anitha,  You can find sum of two ...READ MORE

## How to aggregate table calculation in tableau

You may proceed with Max and Min ...READ MORE

## Calculated filed with if-then

Below is the required code:  IF (NOT ISNULL([test2])) ...READ MORE

## How to calculate profit when cost and revenue are in same column?

You can create the following calculated fields: Profit: SUM(IIF([account_category] ...READ MORE