2 Replies Latest reply on Jul 12, 2018 10:28 AM by Levan Uridia

# Get Only One Value from each Fixed Dimension

Hey guys,

I have a chart like this

num_2

type_1

Fixed

1A

2

1B2
3D2
1A2
3D2
3C2

The fixed colum is a calculated field exactly like this:

{ FIXED [num_2] : COUNTD([type_1]) }

This so I can get how many type_1 values are there in each num_2 values. The fixed column is what i get. It's perfectly right, but in the end that's not exactly what i need. The point here is I need the Sum of how many values are there in each num_2 values. In other words and applying to this reduced and adapted case, I need to Sum "2" (from the amount of type_1 values attached to the num_2 "1" value) to "2" (from the amount of type_1 values attached to the num_2 "3" value). Can you get what I mean? The problem I'm having is I can't just apply a sum on the Fixed column, since its output would be "12", instead of "4" - the number I wanna get.

I'm trying to think a way of just filling in the fixed column with the matching value of its calculated field only in the first row which the num_2 appears. Just like this:

num_2

type_1

Fixed

1A

2

1B0
3D2
1A0
3D0
3C0

This way I'll be able to add up it all with no problems.

Unfortunately i can't provide you any data or print from my database or anything else. It's a pretty confidential data. It might be important say that it's a very big database too, about 130 million records.

• ###### 1. Re: Get Only One Value from each Fixed Dimension

HI Arthur,

Without having unique identifier, Tableau can no hold two "1A" and "3D" as different line item..

Do you have sequential unique ID or something?

Thanks,

Shin

• ###### 2. Re: Get Only One Value from each Fixed Dimension

Very nice idea

just minor comment I think Arthur wants calculation

Min seq Id like this:    {fixed [Num 2]: MIN([ID])}

The rest the same.

sheet 2 of the attached workbook.

I wander if the same would work with window calculation like in

sheet 1 of the attached workbook?