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.
stevedep
Memorable Member
6 years agoHi 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.