Forum Discussion
GvidoB
8 years agoFrequent Visitor
Calculating sum of values per user using user specific date period
Hi everybody, I'm quite new to Power Bi and am struggling with this task: Calculating value generated of every user in the first 30 days since the Created_At date. Here' s how my data loo...
- 8 years ago
HI GvidoB
This calculated measure gets pretty close and doesn't rely on any relationships. I have attached a copy of the PBIX file.
Measure = VAR x = GENERATE( User, FILTER( 'Orders', 'Orders'[User_Id] = User[User_ID] && 'Orders'[Sent_At] < 'User'[Created_At] +30 ) ) RETURN SUMX(x,[Value])
Phil_Seamark
Microsoft Employee
8 years agoHI GvidoB
This calculated measure gets pretty close and doesn't rely on any relationships. I have attached a copy of the PBIX file.
Measure =
VAR x =
GENERATE(
User,
FILTER(
'Orders',
'Orders'[User_Id] = User[User_ID] &&
'Orders'[Sent_At] < 'User'[Created_At] +30
)
)
RETURN SUMX(x,[Value])GvidoB
8 years agoFrequent Visitor