Forum Discussion

GvidoB's avatar
GvidoB
Frequent Visitor
8 years ago
Solved

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...
  • Phil_Seamark's avatar
    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])