Forum Discussion
ermak
6 years agoFrequent Visitor
SUM value from only the first occurrence
I have two tables ('UserID' and 'User_Balance'). In one - the source of traffic and user ids, in others, user ids and their balances. I create a connection and display into a table just the sums of u...
- 6 years ago
Hi ermak ,
See below:
__New = SUMX(SUMMARIZE(ALL_HITS,ALL_HITS[user_id], "b", IF( CALCULATE(FIRSTNONBLANK(ALL_HITS[date],MIN(ALL_HITS[hits_referer])), ALLEXCEPT(ALL_HITS, ALL_HITS[user_id])) = MIN(ALL_HITS[date]) , MIN('Users Balance'[Balance USD]), BLANK()) ),[b])Link to file.
Please mark as solution if so. Thumbs up for the effort are appreciated.
Kind regards,
Steve.
ermak
6 years agoFrequent Visitor
Greg_Deckler, thanks for the advice. I changed the first post a little.
I tried the FIRSTNONBLANK function but it doesn't work.
sum = SUMX(FIRSTNONBLANK (User_ID[Source],'User_ID'[Source]),SUM(User_Balance[User_Balance]))