wesley.yau
New Member
- Joined
- Nov 19, 2012
- Messages
- 3
I have two sets of data set up as shown below.
Records of items sold - keeps track of the number of coloured shapes sold. [TABLE="width: 500"]
<TBODY>[TR]
[TD]Shape
[/TD]
[TD]Colour
[/TD]
[TD]Volumn
[/TD]
[/TR]
[TR]
[TD]Sphere
[/TD]
[TD]Red
[/TD]
[TD]20
[/TD]
[/TR]
[TR]
[TD]Sphere
[/TD]
[TD]Blue
[/TD]
[TD]10
[/TD]
[/TR]
[TR]
[TD]Sphere
[/TD]
[TD]White
[/TD]
[TD]5
[/TD]
[/TR]
[TR]
[TD]Sphere
[/TD]
[TD]Red
[/TD]
[TD]30
[/TD]
[/TR]
[TR]
[TD]Rectangle
[/TD]
[TD]Blue
[/TD]
[TD]40
[/TD]
[/TR]
[TR]
[TD]Rectangle
[/TD]
[TD]White
[/TD]
[TD]25
[/TD]
[/TR]
[TR]
[TD]Rectangle
[/TD]
[TD]Red
[/TD]
[TD]35
[/TD]
[/TR]
[TR]
[TD]Rectangle
[/TD]
[TD]Blue
[/TD]
[TD]30
[/TD]
[/TR]
[TR]
[TD]Rectangle
[/TD]
[TD]White
[/TD]
[TD]20
[/TD]
[/TR]
</TBODY>[/TABLE]
Total number of items in stock
[TABLE="width: 500"]
<TBODY>[TR]
[TD]Shape
[/TD]
[TD]Colour
[/TD]
[TD]Stock
[/TD]
[/TR]
[TR]
[TD]Sphere
[/TD]
[TD]Red
[/TD]
[TD]100
[/TD]
[/TR]
[TR]
[TD]Sphere
[/TD]
[TD]Blue
[/TD]
[TD]130
[/TD]
[/TR]
[TR]
[TD]Sphere
[/TD]
[TD]White
[/TD]
[TD]120
[/TD]
[/TR]
[TR]
[TD]Rectangle
[/TD]
[TD]Red
[/TD]
[TD]130
[/TD]
[/TR]
[TR]
[TD]Rectangle
[/TD]
[TD]Blue
[/TD]
[TD]140
[/TD]
[/TR]
[TR]
[TD]Rectangle
[/TD]
[TD]White
[/TD]
[TD]150
[/TD]
[/TR]
</TBODY>[/TABLE]
But total sphere cannot be sold more than 300 and total rectangle cannot be sold more than 350
How do I go about setting up a custom "Percentage Sold" measure like the following?
[Shape] [Colour] [Percentage Sold]
Sphere Red 50% (50 / 100)
Sphere Blue 7.69% (10 / 130)
Sphere White 4.17% (5 / 120)
Total Sphere 21.67% (Instead of 65 / 350, I need 65 / 300)
Same goes for rectangle.
Any help would be appreciated, thanks!
Records of items sold - keeps track of the number of coloured shapes sold. [TABLE="width: 500"]
<TBODY>[TR]
[TD]Shape
[/TD]
[TD]Colour
[/TD]
[TD]Volumn
[/TD]
[/TR]
[TR]
[TD]Sphere
[/TD]
[TD]Red
[/TD]
[TD]20
[/TD]
[/TR]
[TR]
[TD]Sphere
[/TD]
[TD]Blue
[/TD]
[TD]10
[/TD]
[/TR]
[TR]
[TD]Sphere
[/TD]
[TD]White
[/TD]
[TD]5
[/TD]
[/TR]
[TR]
[TD]Sphere
[/TD]
[TD]Red
[/TD]
[TD]30
[/TD]
[/TR]
[TR]
[TD]Rectangle
[/TD]
[TD]Blue
[/TD]
[TD]40
[/TD]
[/TR]
[TR]
[TD]Rectangle
[/TD]
[TD]White
[/TD]
[TD]25
[/TD]
[/TR]
[TR]
[TD]Rectangle
[/TD]
[TD]Red
[/TD]
[TD]35
[/TD]
[/TR]
[TR]
[TD]Rectangle
[/TD]
[TD]Blue
[/TD]
[TD]30
[/TD]
[/TR]
[TR]
[TD]Rectangle
[/TD]
[TD]White
[/TD]
[TD]20
[/TD]
[/TR]
</TBODY>[/TABLE]
Total number of items in stock
[TABLE="width: 500"]
<TBODY>[TR]
[TD]Shape
[/TD]
[TD]Colour
[/TD]
[TD]Stock
[/TD]
[/TR]
[TR]
[TD]Sphere
[/TD]
[TD]Red
[/TD]
[TD]100
[/TD]
[/TR]
[TR]
[TD]Sphere
[/TD]
[TD]Blue
[/TD]
[TD]130
[/TD]
[/TR]
[TR]
[TD]Sphere
[/TD]
[TD]White
[/TD]
[TD]120
[/TD]
[/TR]
[TR]
[TD]Rectangle
[/TD]
[TD]Red
[/TD]
[TD]130
[/TD]
[/TR]
[TR]
[TD]Rectangle
[/TD]
[TD]Blue
[/TD]
[TD]140
[/TD]
[/TR]
[TR]
[TD]Rectangle
[/TD]
[TD]White
[/TD]
[TD]150
[/TD]
[/TR]
</TBODY>[/TABLE]
But total sphere cannot be sold more than 300 and total rectangle cannot be sold more than 350
How do I go about setting up a custom "Percentage Sold" measure like the following?
[Shape] [Colour] [Percentage Sold]
Sphere Red 50% (50 / 100)
Sphere Blue 7.69% (10 / 130)
Sphere White 4.17% (5 / 120)
Total Sphere 21.67% (Instead of 65 / 350, I need 65 / 300)
Same goes for rectangle.
Any help would be appreciated, thanks!