Question: I have a data set like below,

```
Lot Size    Reported QTY    Qty Balance
150          100            
150          100            
150          80             
150          80            
150          5              

```

The Qty Balance needs to calculated as follows,

```
Row 1 = Lot Size - Reported Qty (row1) => 150-100 = 50
Row 2 = Reported Qty (row1) - Reported Qty(row2) => 100-100 =0
Row 3 = Reported Qty (row2) - Reported Qty(row3) => 100-80 =20
... till the last row

```

My expected result is 

```
Lot Size    Reported QTY    Qty Balance
150          100            50
150          100            0
150          80             20
150          80             0
150          5              75

```

How do I achieve this in a query?

Answer: 
So after all the research, I came to the conclusion that the only advantage of `rem`, is that users who use a bigger default font-size in their browser setting, will get the font-size scaled properly, while `px` will not scale. In other words, using `rem` for `font-size`, adds support for [Accessibility](http://en.wikipedia.org/wiki/Accessibility) to your website.

To sum up:

* `rem` is a way to add support for [Accessibility](http://en.wikipedia.org/wiki/Accessibility) to your website.
* Keep in mind, most users use zoom instead of font-size change in their browser and phones, because zoom easier to access.
* Browser zoom has additonal affect on `em`, in other words, it scales `rem` and `px` equally.
* Since 2012, `rem` is supported by all major browsers on desktop and mobile devices.
* Use `px` as fall back option for IE8 and lower.
* Although not specified by W3C, all browser across desktop and mobile devices have implemented a default `font-size`of 16px (feel free to Google yourself), which equals to 1`rem`/`em`
* To make the conversion easier between `px` and `rem` you can use `html {font-size: 62.5%;}` which converts `10px` to `1rem`

In one sentence: Use `rem` with `px` on `font-size` to support accessibility.

```
html {
    font-size: 62.5%;
}

.your_class {
    font-size: 16px;
    font-size: 1.6rem;
}

```
We should use rems or em because they are based on font-size. It may seem a bit strange but by doing so we can build more robust responsive layouts because just by changing font sizes, we will automatically change length.

Since it depends on font size and that gives us a lot of flexibility, and it's just a great technique.