Skip to main content

Hi Experts

 

I was practicing this question on Superstore data as "adding 2% of previous year(2012) to 2013 sales for unprofitable products, how many products turned profitable in numbers". But I am stuck in adding profit of year 2012 to 2013 sales. I created case expressions for new profit and sales but it's not working right.

 

I am attaching the workbook for reference.

 

Appreciate your support on the same.

 

Thanks

Kanu

 

P.S. I saw this practice question while doing an online course.

6 件の回答
  1. 2017年9月19日 6:17

    So, we need to add 2% of 2012 Profit to 2013 Sales.

    I created a calculated field to calculate the 2% Profit.

     

    Now I created another calculated field like below.

     

    So, we need to add 2% of 2012 Profit to 2013 Sales.I created a calculated field to calculate the 2% Profit. Now I created another calculated field like below.

     

    Basically I am using lookup function to bring me preivious year values to the current year and add it to Current year Sales. This is a table calculation. So, you should be carefull of how you are editing it (Edit Table Calculations).

     

    Before editing the table calculation, you need to bring in the Year, Subcategory( i took this instead of Product as it has few members and easy to observe the calculations) to the worksheet. The rest of the Measures I bought in are only for the checking the calculation purpose and you can remove them eventually.

     

    Once you bring in the above table calculation in to the view, Right click and open "Edit Table Calculation" box and do the below.

     

    first go to Advanced Compute Using.

    pastedImage_3.png

     

    pastedImage_4.png

    Keep Year of order date in Partitioning and Sub Category in Addressing. Click OK.

     

    Make at the Level - Year of Order Date

     

    pastedImage_5.png

     

    Thats it. let me know if it helps you. I also attacched the twbx file.

0/9000