Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Use Set Analysis to sum records with all 13 Time Periods

Hello,

I'm having a hard time thinking of the formula to sum records that have 13 Periods by Site.

Here is an example image

Site_By_Period.PNG

As you can see, Site 4 only has 3 periods, where as Site 6 has 13 periods. I would like to be able to omit Site 4 entirely since it doesn't have the full 13 periods.

Here is my formula, but I believe it is summing all periods

sum({<gl_Flag={'1'} , Year={'2015'}, [BUS TYPE]={'RETAIL'},[FUEL $]={'>0'},PERIOD={'<=13'}>}[FRESCH GP$])

Any help would be appreciated!

Thanks,

Channing

1 Solution

Accepted Solutions
aarkay29
Specialist
Specialist

Check if this works you!


sum({<gl_Flag={'1'} , Year={'2015'}, [BUS TYPE]={'RETAIL'},[FUEL $]={'>0'},Site={"=Count(Site)>=13">}[FRESCH GP$])

View solution in original post

5 Replies
aarkay29
Specialist
Specialist

try this

sum({<gl_Flag={'1'} , Year={'2015'}, [BUS TYPE]={'RETAIL'},[FUEL $]={'>0'},PERIOD={'>=13'}>}[FRESCH GP$])

Anonymous
Not applicable
Author

Will this only include records with 13 as the period?

Anonymous
Not applicable
Author

bump

aarkay29
Specialist
Specialist

Check if this works you!


sum({<gl_Flag={'1'} , Year={'2015'}, [BUS TYPE]={'RETAIL'},[FUEL $]={'>0'},Site={"=Count(Site)>=13">}[FRESCH GP$])

Anonymous
Not applicable
Author

Perfect! Thank you!