Suppose you have Sales and Profit data per year. It is in the wide data format - there are columns for Sales by Category and Profit by Category.
Now, you want to transform Sales and Profit data into the long format like the following.
Here is how.