# Stock Availability

**URL:** <https://pug.phocassoftware.com/t/stock-availability/1235>\
**Category:** Ask the Community\
**Created:** [August 28, 2019, 4:48pm UTC](https://pug.phocassoftware.com/t/stock-availability/1235 "2019-08-28T16:48:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![StuartH](https://sea1.discourse-cdn.com/flex015/user_avatar/pug.phocassoftware.com/stuarth/32/394_2.png) [@StuartH](https://pug.phocassoftware.com/u/StuartH)\
**Post date:** [August 28, 2019, 4:48pm UTC](https://pug.phocassoftware.com/t/stock-availability/1235/1 "2019-08-28T16:48:51Z")

</div>

I’m trying to build a stock availability measure in a dashboard.

Basically I want to initially calculate how many live stock lines are available for sale as a percentage of the total live stock lines.

The next phase would be to extend this to consider the number of weeks cover on a stock line and show the percentage of lines that have sufficient stock rather than just 1’s or 2’s.

Any ideas, I’m presuming I need to use a CASE WHEN but not sure how to get the percentage of all lines to work.

---

<div class="post-metadata">

**Author:** ![michael.fenton](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@michael.fenton](https://pug.phocassoftware.com/u/michael.fenton)\
**Post date:** [August 30, 2019, 2:00am UTC](https://pug.phocassoftware.com/t/stock-availability/1235/2 "2019-08-30T02:00:19Z")

</div>

You may be able to use a Stream Variance % report to do this.  
If you load Available Stock in one stream, and Total Stock in another stream, then Variance % will show one value as a % of the other value.  
Alternatively, load the two values into different measure and use a custom report to calculate the %.

---

<div class="post-metadata">

**Author:** ![StuartH](https://sea1.discourse-cdn.com/flex015/user_avatar/pug.phocassoftware.com/stuarth/32/394_2.png) [@StuartH](https://pug.phocassoftware.com/u/StuartH)\
**Post date:** [August 30, 2019, 7:11am UTC](https://pug.phocassoftware.com/t/stock-availability/1235/3 "2019-08-30T07:11:44Z")

</div>

I see what you’re doing here but it’s the number of items in stock vs all items i want, not just the Available vs Total Inventory - although this would be interesting too.
