cancel
Showing results for 
Search instead for 
Did you mean: 

Help in Calculation View

Former Member
0 Kudos


Hi Frzz,

Am trying to create a calulation view with two tables. After joining two tables i want the data in below format could you please guide me how to achieve this.

I tried doing it by creating calulated columns of different Status and performed join at each level. But it degrades the performance. Is there is any other way that i can ahieve this??

Table1:

EmployeeIDName
EMP001Ram
EMP002Raj
EMP002Rahul

Table2:

EmployeeIDStatus
EMP001Temporary
EMP002Contract
EMP003Permanent

Result:

EmployeeIDEmployeeNameTemporaryContractPermanent
EMP001RamYESNULLNULL

EMP002

RajNULLYESNULL
EMP003RahulNULLNULLYES

Best Regards,

Krishna.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos


Hi Krishna,

Even I have the same requirement in my project.

I tried in this way .

I took three projections and in each project I have created a calculated column with data type as interger and used if condition as below.

projection 1

if("STATUS" = 'Temporary', 1,0)

Projection2:

if("STATUS" = 'contract', 1,0)

Projection3:

if("STATUS" = 'Temporary', 1,0)

and then I used union

finally in sematics I took aggregation as sum for all these calculated colum values.

the output is as below.

.

did you get any other way to resolve it. please share.

see the structure as an attachement to this

Hope this resolves your issue.

Thankyou

Former Member
0 Kudos

Thank you Chandrakala. Even i followed the same as i have factual information.

Answers (3)

Answers (3)

rindia
Active Contributor
0 Kudos

Hi Krishna,

If there are no measures then you can achieve the same in Attribute view.

In the data foundation get the two tables and join them based on your data(referential join as per your example) and create 3 calculated columns:

Temporary with expression if("STATUS" = 'Temporary', 'YES', 'NULL')

Contract with expression if("STATUS" = 'Contract', 'YES', 'NULL')

Permanent with expression if("STATUS" = 'Permanent', 'YES', 'NULL')


Do the activation and observe the output.


Regards

Raj

Former Member
0 Kudos

HI Raj,

Thanks for your update. As we have some measures i have created the CCs in Calculation view by using projection.

Thank you.

Best Regards,

Krishna.

former_member182302
Active Contributor
0 Kudos

Seems like a transpose requirement.

Have a look on

Regards,

Krishna Tangudu

former_member187673
Active Participant
0 Kudos

Hi Krisha, not sure what you mean by "performed join at each level" on the calculated columsn.

You should be able to simply create 3 calculated columns with expression like this for column "Temporary":

if("STATUS" = 'Temporary', 'YES', 'NULL')

Peter