I don't know that you can do this with a box. However, you could try this instead:
1. Replace the box with a text object.
2. Right-click on the object and select "Format Text...".
3. Go to the Border tab. Set the border to Single for each side and set the background color. Then click on OK.
4. Right-click on the text object and select "Size and Position".
5. Click on the formula button next to width. Enter a formula that will set the width based on the data.
If you want to show a variable width bar that is within a box that is always the same size, you could either draw a box around the text object or overlay two text objects - one that has the border and is always the same size and one that has the background color and variable width. Align the top and left of the two and put the border block behind the color block.
-Dell