1 2 Previous Next 14 Replies Latest reply on Aug 23, 2018 6:07 AM by Bill W

# Reclassifying Data Values

Afternoon,

I am trying to move values under a different dimension name.

For example per my package workbook.

I have the below table.

What I would like to do is take the values in Location (A,B and C) that have [Other] values and move them to the [Other] Location value and still have the ability to filter on the Location value with the calculation. Any thoughts on this?

Thanks - Bill

LocationIncomingOther

Other

260
Team A7825
Team B121118
Team C5095
• ###### 1. Re: Reclassifying Data Values

I just answered a similar question earlier today. Can you take a look at this approach, which leverages a union, and see if it works for you? Count Rows based on same value(s) found in 2 columns

• ###### 2. Re: Reclassifying Data Values

Bill,

Are you looking for this : Then formula for new other is :

if [Location]='Other' then {sum([Other])} else [Other] end

if you want this: The formula is:

if [Location]='Other' then {sum([Other])} else NULL end

1 of 1 people found this helpful
• ###### 3. Re: Reclassifying Data Values

Here's a sample I worked up. Basically, I unioned the table to itself, then created the following calculation:

Location with Other

IF [Table Name]="Test" THEN

IF ISNULL([Other]) = FALSE AND [Location]<>"Other" THEN

"Other"

END

ELSE

[Location]

END

Here's the Result. See attached workbook. 1 of 1 people found this helpful
• ###### 4. Re: Reclassifying Data Values

Thanks Ken and Ankit.

Is there a way to get rid of the Team A,B and C Other values?

Maybe combining both of your formulas together would do the trick.

Note: 498, would be the value I am seeking. Not sure how you got 1,494 Ankit, because its fixed?

-Bill

• ###### 5. Re: Reclassifying Data Values

like this? If so, you could just create another calculated field, which I've called "Other New"

IF [Location with Other]="Other" THEN

[Other]

END

See attached.

• ###### 6. Re: Reclassifying Data Values

I can't open yours.

I only have 10.4 - Sorry should of preference this.

-Bill

• ###### 7. Re: Reclassifying Data Values

Oh.  You unioned the table.

Didn't catch that.

Not sure if that is a viable option for what I am trying to do.

• ###### 8. Re: Reclassifying Data Values

Here's a version in 10.4.

What data source are you using? Union is definitely only supported in certain sources.

• ###### 9. Re: Reclassifying Data Values

I'm connected directly to a Sharepoint site.

Extracts on a daily basis.

• ###### 10. Re: Reclassifying Data Values

I think I figured out how to do it.

Had to create a nested LOD.

if [location value] = "Other" then

{include [date] : avg({exclude [location value] : sum(other)})}

end

• ###### 11. Re: Reclassifying Data Values

Never mind, this didn't work lol.

• ###### 12. Re: Reclassifying Data Values

Here you go: Formula for new other  is:

if attr([Location])='Other' then sum({sum([Other])}) else null end

Also make your date filter as context filter.

• ###### 13. Re: Reclassifying Data Values

hi Ankit

In previous answer you get 1,494 which is 3 times of 498.

Do you know why tableau returns this value?

And why you use attr and sum({sum}) ?

Can you explain a bit?

thanks

YT

• ###### 14. Re: Reclassifying Data Values

Tian,

LOD calculation are not aggregated itself. Since in your source you have 3 rows for location=Other, so data was aggregating 3 times. Now when i aggregated in calculation itself (sum({sum})), It worked fine.

attr I need to use because we can use non aggr and aggr values in same calculation , so need to make that ATTR.

1 2 Previous Next