Forum Discussion

dwedding3's avatar
dwedding3
Frequent Visitor
2 years ago
Solved

Daily Sum of Measures without using Powerquery

Hello!

 

I have a bit of a weird request, which I'll give an example for shortly as I don't think i can accurately describe it. 

 

Solutions can't use Powerquery/add columns as I don't have access to the data directly, and am only able to make measures using the data.

 

So here's the problem using an example:
Each day, we receive a variety of items. Each item is received in as multiple units, but I need to know how many boxes we received, which I calculate by dividing the units received by the pack size. So, for example, if we receive 24 pepsi cans, and each box contains 12, we received 24/12=2 boxes. Sometimes boxes are incomplete (so 23 pepsi cans instead of 24): in this case, we round up to the nearest box.

Calculating the number of boxes for each order isn't too hard: however, I need to know how many boxes we received over each day. How can I calculate that, keeping in mind that we often receive the same item multiple times each day, and that if I just take the sum of the items, I could get the wrong number of boxes. (For example, the first truck has 2 boxes of Pepsi can, sized 11 and 12. Another truck has a box of 1 Pepsi can. I need to have 3 calculated rather that (11+12+1)/12=2

 

Thanks!

2 Replies