I'm very new to DAX and PowerPivots. I am using PowerPivot to pull data from an SQL server. The data I'm working with is pretty large and complex but I'm considering a simplified version of it for this question.
Let's say I have 2 columns, one that contains product names and one that contains a date that product was sold. I have a row for each time 1 unit of any product is sold.
Product | Date
Orange | 08/13/2013
Orange | 08/13/2013
Orange | 08/13/2013
Apple | 08/14/2013
Apple | 08/16/2013
Orange | 08/17/2013
Orange | 08/17/2013
I want to use DAX to get a running count of how much of a product has been sold to date over the entire data set. This is what I would like to end up with.
Product | Date | Cumulative Sales
Orange | 08/13/2013 | 1
Orange | 08/13/2013 | 2
Orange | 08/13/2013 | 3
Apple | 08/14/2013 | 1
Apple | 08/16/2013 | 2
Orange | 08/17/2013 | 4
Orange | 08/17/2013 | 5
Any help would be appreciated.
EDIT: One more thing, the data is not necessarily ordered by date. I could potentially order it by date but it would require modification of some other things so my preference would be not to do so if at all possible. There are a lot of other formulas in the sheet I inherited and reordering may break something else.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…