I've been trying to get the the "Inital Stock" column and aggregate it by product :
I calcuted the column EntryDate using:
How can i get the EntryDate's Stock (ie InitialStock) reapeated across all dates.
Also, from that column i need to be able to aggregate by product like so :
I wonder this can easily be been via DAX.
Thanks for your help.
Go to Solution.
You are going to want something like:
InitialStock = MAXX(FILTER(ALL('Table13'),[ProductID] = EARLIER([ProductID]) && [Date] = EARLIER([EntryDate])),[Stock])
That's a column formula.
See Table 13 of attached.
Proud to be a Super User!
View solution in original post
You do not need the Initial Stock and EntryDate columns at all. This measure will work
Hope this helps.
Thanks. the add column works as excepted but this doesn't aggregates well.
Thanks @Greg_Deckler and @Ashish_Mathur for your answers.
The solution you provided only solved one aspect of my problem but it definitely gives me ideas to go further. Thanks again
I am not sure of what you mean but if my reply helped, please mark it as Answer.
Hi @Raimana ,
I was also looking for a similar solution. Could you please let me know what worked for you?
Check out the on demand sessions that are available now!
Check out the Winners!
Learn how Power BI works with the latest Azure data and analytics innovations at the digital event with Microsoft CEO Satya Nadella.