Create extra field values by dividing the values in the same table

    I need a table with Type as a dimension


    it should have the values


    Medium-to-small rate,


    Small-to-Large rate,



    however in the source data the field Type has 3 values only those are Medium, Small, Large.


    the Medium-to-Small rate  is the ratio of Small/Medium also the Small-to-Large rate is the ratio of Large/Small.


    Expected Output:

    Type                              2015 Sep

    Medium                         52840

    Medium-to-small rate    65%

    Small                             34558

    Small-to-Large rate       90%

    Large                             31040


    Medium-to-small rate    65%  can be obtain by calculating the   Small Value/Medium Value, Here 34558/52840 =65%

    Small-to-Large rate       90%   can be obtain by calculating the  Large Value/Small Value, Here 31040/34558=90%