简体   繁体   中英

Tableau data calculation to distribute the data from value to other value in tha same column

在此处输入图像描述

The existing data if I build a table it looks like this...but I was the value under not defined should be distributed equally among the other 3 fields or three-column how to do it??

The result should look like the one below

在此处输入图像描述

You have not provided any column names or information about your data, so I will assume that the field with "2020M12" value is called MonthYear and field with "Global", "Enterprise" etc. is called "Type".

Create a new calculated field called "Undefined Customers New to Cloud MOM" with the following formula assuming SUM is the preferred aggregation:

{FIXED [Type], [MonthYear]: SUM(IIF([Type]="Note Defined", [Cust New to Cloud MOM], NULL))}

Create another formula called "Cust New to Cloud MOM - Apportioned" with the following formula:

([Undefined Customers New to Cloud MOM]/3) + [Customers New to Cloud MOM]

You can make the 3 used in the formula above dynamic by using COUNTD([Type])-1

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM