Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Substitutes for EARLIER?

Hi,

 

My question comes down to "the best practices". I've had this problem quite a few times and I don't know how to approach it in the right way. So, let's say that I have some table with sales amount and customer id. What I would do to get aggregated value for each customer would be:

CALCULATE(SUM(table[sales_amount]);FILTER(table;table[customer_id]=EARLIER(table[customer_id]))

However, working with VS studio tabular model designer, this usually results in freezing editor and urgent need to use crtl + alt + delete.  

 

I just wonder if there is some more memory-efficient solution or is it my tabular model design that is bad. I would be very grateful if someone could point me to the right direction. 

2 Replies