2 Replies Latest reply on Jul 24, 2016 7:57 AM by Béatrice LORIOT

# Sum one item of the dimension only

Hi all,

I am sure this is a stupid question but can't find the solution myself ..

My dimension is user type and my measure is visits, as follows :

User type               Visits

New visitor              2000

Returning visitor     2500

I want to extract New visitor visits only (not filter) and get a measure for new visitors visits only.

I tried

if ATTR( [User Type] )='new visitor' then sum ([Visits]) END, calculation is valid but but it s not working and return "null value"

KR

Béatrice

• ###### 1. Re: Sum one item of the dimension only

hi Béatrice,

So you were almost there!...you just need to run your condition at row level and then aggregate the results of that formula (SUM)

So your (Row Level) formula would be

If [User Type] ='new visitor' then [Visits] END

you can then drag this field in with the aggregation of sum, or could do it all in one go

SUM(If [User Type] ='new visitor' then [Visits] END)

1 of 1 people found this helpful
• ###### 2. Re: Sum one item of the dimension only

Hi Simon,

Thanks a lot!  Now I am there :-)

KR

Béatrice