# How to calculate the difference between every two years and k-means clustering question.

Hi,

Currently this is my data view

In the result, first, i need to get the difference between revenue-expenses between every two years (2018-2017; 2017-2016..)

The result I get must be in percentage

May I know how to do this? I have tried using generate attribute, date diff also didnt work

Besides that, this is my k-means clustering results

Although the result is correct already, but my lecturer ask me to convert the result into percentage form?

Does anyone can help? Thanks in advance and I'm really appreciate your help.

Currently this is my data view

In the result, first, i need to get the difference between revenue-expenses between every two years (2018-2017; 2017-2016..)

The result I get must be in percentage

May I know how to do this? I have tried using generate attribute, date diff also didnt work

Besides that, this is my k-means clustering results

Although the result is correct already, but my lecturer ask me to convert the result into percentage form?

Does anyone can help? Thanks in advance and I'm really appreciate your help.

Tagged:

0

## Answers

1,630UnicornYou would of course need to do this for each attribute you want to create. If you have a lot of these and the manual construction of these attributes is tedious, this could be automated with a loop and macros as well.

Lindon Ventures

Data Science Consulting from Certified RapidMiner Experts

2,959Community Manager