Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis

This should be an easy one for most people.....

I am trying to sum the hits for a distinct date, dayused is in the format DD/MM/YYYY 00:00:00

 

sum

({$<DISTINCT dayused>}hits)

This is not however working? Any suggestions? Do I have the DISTINCT in the wrong place?

Thanks

1 Solution

Accepted Solutions
Gysbert_Wassenaar

try sum(total <dayused> hits)


talk is cheap, supply exceeds demand

View solution in original post

6 Replies
Anonymous
Not applicable
Author

hi steve,

if dayused is a dimension in your chart, or if you are selecting dayused in a filter, then you shouln't need set analysis, just a sum of the hits.

if dayused is a variable and you are trying to show the hits for the variable's date you will the following syntax>

sum ({$<DayUserDateField={'$(dayused)'}>} hits)

jonathan

Not applicable
Author

dayused is a dimension, so I simply created an expression of sum(hits), however, the results come out as per below;

The problem I have is that there are a number of hits by various people, for example,

uuid           dayused                         hits               addr_formatted               sum(hits)

496833          02/04/2013                    1                    Steve Wood                    1

496833          02/04/2013                    7                    John Wood                      7

496833          02/04/2013                    8                    Sandra Wood                  8

so it is not giving me the hits per day but instead summing the hits per addr_formatted.

Steve

Not applicable
Author

Actually when I remove the addr_formatted field as a dimension it sums the hits by physical number

so for example I have 3 people with 1 hit, 1 person with 7 hits and 1 person with 8 hits, the results now show as

uuid           dayused                         hits                            sum(hits)

496833          02/04/2013                    1                                      3

496833          02/04/2013                    7                                      7

496833          02/04/2013                    8                                      8

Not applicable
Author

can u post a some scrabmle data?

Gysbert_Wassenaar

try sum(total <dayused> hits)


talk is cheap, supply exceeds demand
Not applicable
Author

Thanks Gysbert! That works perfectly!