Hi Here is the logic I would like to re-write in a much compact version. I know its possible but am confused so I am providing the entire logic in very raw expanded version.

```
{
    //unitOfDisplay = "MB";
    keyValuePair.Value.MonthlyInfo[TOTAL].RowHeader = "Total MB";

    if (keyValuePair.Value.MonthlyInfo[UNIT].Month1 != "-" && keyValuePair.Value.MonthlyInfo[UNIT].Month1 != toUOM.ToString())
    {
        string fromunit = keyValuePair.Value.MonthlyInfo[UNIT].Month1;
        //Call converter method
        double outdata;
        if (keyValuePair.Value.MonthlyInfo[TOTAL].Month1 != "-" && !(keyValuePair.Value.MonthlyInfo[TOTAL].Month1.ToString().Equals("0.00")))
        {
            ConvertDataUnit(keyValuePair.Value.MonthlyInfo[TOTAL].Month1, fromunit, toUOM.ToString(), out outdata);
            keyValuePair.Value.MonthlyInfo[TOTAL].Month1 = outdata.ToString("#,###,###.##");
        }                                             
        if (keyValuePair.Value.MonthlyInfo[INCLUDED].Month1 != "-" && !(keyValuePair.Value.MonthlyInfo[INCLUDED].Month1.ToString().Equals("0.00")))
        {
            ConvertDataUnit(keyValuePair.Value.MonthlyInfo[INCLUDED].Month1, fromunit, toUOM.ToString(), out outdata);
            keyValuePair.Value.MonthlyInfo[INCLUDED].Month1 = outdata.ToString("#,###,###.##");
        }
        if (keyValuePair.Value.MonthlyInfo[BILLED].Month1 != "-" && !(keyValuePair.Value.MonthlyInfo[BILLED].Month1.ToString().Equals("0.00")))
        {
            ConvertDataUnit(keyValuePair.Value.MonthlyInfo[BILLED].Month1, fromunit, toUOM.ToString(), out outdata);
            keyValuePair.Value.MonthlyInfo[BILLED].Month1 = outdata.ToString("#,###,###.##");
        }
    }
    if (keyValuePair.Value.MonthlyInfo[UNIT].Month2 != "-" && keyValuePair.Value.MonthlyInfo[UNIT].Month2 != toUOM.ToString())
    {
        string fromunit = keyValuePair.Value.MonthlyInfo[UNIT].Month2;
        //Call converter method.
        double outdata;
        if (keyValuePair.Value.MonthlyInfo[TOTAL].Month2 != "-" && !(keyValuePair.Value.MonthlyInfo[TOTAL].Month2.ToString().Equals("0.00")))
        {
            ConvertDataUnit(keyValuePair.Value.MonthlyInfo[TOTAL].Month2, fromunit, toUOM.ToString(), out outdata);
            keyValuePair.Value.MonthlyInfo[TOTAL].Month2 = outdata.ToString("#,###,###.##");
        }
        if (keyValuePair.Value.MonthlyInfo[INCLUDED].Month2 != "-" && !(keyValuePair.Value.MonthlyInfo[INCLUDED].Month2.ToString().Equals("0.00")))
        {
            ConvertDataUnit(keyValuePair.Value.MonthlyInfo[INCLUDED].Month2, fromunit, toUOM.ToString(), out outdata);
            keyValuePair.Value.MonthlyInfo[INCLUDED].Month2 = outdata.ToString("#,###,###.##");
        }
        if (keyValuePair.Value.MonthlyInfo[BILLED].Month2 != "-" && !(keyValuePair.Value.MonthlyInfo[BILLED].Month2.ToString().Equals("0.00")))
        {
            ConvertDataUnit(keyValuePair.Value.MonthlyInfo[BILLED].Month2, fromunit, toUOM.ToString(), out outdata);
            keyValuePair.Value.MonthlyInfo[BILLED].Month2 = outdata.ToString("#,###,###.##");
        }
    }
    if (keyValuePair.Value.MonthlyInfo[UNIT].Month3 != "-" && keyValuePair.Value.MonthlyInfo[UNIT].Month3 != toUOM.ToString())
    {
        string fromunit = keyValuePair.Value.MonthlyInfo[UNIT].Month3;
        //Call converter method.
        double outdata;
        if (keyValuePair.Value.MonthlyInfo[TOTAL].Month3 != "-" && !(keyValuePair.Value.MonthlyInfo[TOTAL].Month3.ToString().Equals("0.00")))
        {
            ConvertDataUnit(keyValuePair.Value.MonthlyInfo[TOTAL].Month3, fromunit, toUOM.ToString(), out outdata);
            keyValuePair.Value.MonthlyInfo[TOTAL].Month3 = outdata.ToString("#,###,###.##");
        }
        if (keyValuePair.Value.MonthlyInfo[INCLUDED].Month3 != "-" && !(keyValuePair.Value.MonthlyInfo[INCLUDED].Month3.ToString().Equals("0.00")))
        {
            ConvertDataUnit(keyValuePair.Value.MonthlyInfo[INCLUDED].Month3, fromunit, toUOM.ToString(), out outdata);
            keyValuePair.Value.MonthlyInfo[INCLUDED].Month3 = outdata.ToString("#,###,###.##");
        }
        if (keyValuePair.Value.MonthlyInfo[BILLED].Month3 != "-" && !(keyValuePair.Value.MonthlyInfo[BILLED].Month3.ToString().Equals("0.00")))
        {
            ConvertDataUnit(keyValuePair.Value.MonthlyInfo[BILLED].Month3, fromunit, toUOM.ToString(), out outdata);
        keyValuePair.Value.MonthlyInfo[BILLED].Month3 = outdata.ToString("#,###,###.##");
        }
    }
    if (keyValuePair.Value.MonthlyInfo[UNIT].Average != "-" && keyValuePair.Value.MonthlyInfo[UNIT].Average != toUOM.ToString())
    {
        string fromunit = keyValuePair.Value.MonthlyInfo[UNIT].Average;
        //Call converter method.
        double outdata;
        if (keyValuePair.Value.MonthlyInfo[TOTAL].Average != "-" && !(keyValuePair.Value.MonthlyInfo[TOTAL].Average.ToString().Equals("0.00")))
        {
            ConvertDataUnit(keyValuePair.Value.MonthlyInfo[TOTAL].Average, fromunit, toUOM.ToString(), out outdata);
            keyValuePair.Value.MonthlyInfo[TOTAL].Average = outdata.ToString("#,###,###.##");
        }
        if (keyValuePair.Value.MonthlyInfo[INCLUDED].Average != "-" && !(keyValuePair.Value.MonthlyInfo[INCLUDED].Average.ToString().Equals("0.00")))
        {
            ConvertDataUnit(keyValuePair.Value.MonthlyInfo[INCLUDED].Average, fromunit, toUOM.ToString(), out outdata);
            keyValuePair.Value.MonthlyInfo[INCLUDED].Average = outdata.ToString("#,###,###.##");
        }
        if (keyValuePair.Value.MonthlyInfo[BILLED].Average != "-" && !(keyValuePair.Value.MonthlyInfo[BILLED].Average.ToString().Equals("0.00")))
        {
            ConvertDataUnit(keyValuePair.Value.MonthlyInfo[BILLED].Average, fromunit, toUOM.ToString(), out outdata);
            keyValuePair.Value.MonthlyInfo[BILLED].Average = outdata.ToString("#,###,###.##");
        }
    }
}

```

This case is only for when the unit of Display is in MB, the logic converts the value for month1's total, billed, and included and average from their respective units(which can be in MB, KB or GB) into 'MB'

Then i have to write 2 more similar cases when unit of display is 1. 'GB' and 2. 'KB'

I need help to write a compact logic for this data. 

Thanks
Kris!