Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
mazacini
Creator III
Creator III

Set Analysis - Sum by Dimension B when Dimension A selected

Hi

I have 3 fields Date, Week and Val

In my table I have an expression sum(Val). When I select Date, it will sum the Val for that Date.

I want to add another expression to sum the Val for all Dates in the Week corresponding to the selected Date.

Any ideas

Ta

Joe

1 Solution

Accepted Solutions
Jason_Michaelides
Luminary Alumni
Luminary Alumni

I'm not sure if this will work without Week being a dimension in your chart, but try:

Sum(TOTAL <Week> Value)

If not, try:

Sum({<Date=, Week=P()>} Value)

Hope this helps,

Jason

View solution in original post

3 Replies
Jason_Michaelides
Luminary Alumni
Luminary Alumni

I'm not sure if this will work without Week being a dimension in your chart, but try:

Sum(TOTAL <Week> Value)

If not, try:

Sum({<Date=, Week=P()>} Value)

Hope this helps,

Jason

mazacini
Creator III
Creator III
Author

Hi Jason

Thanks for that.

First one didn't quite work.

Second one seems to work fine!

But I do seem to be getting a syntax error:

Sum({<Date=, Week=P()>} Val)

Any ideas on what might be causing this, or is it safe to procveed?

Ta

Joe

Jason_Michaelides
Luminary Alumni
Luminary Alumni

Safe to go I'd think. The syntax checker was new to v10 and is a little flaky within set analysis although generally one of the best enhancements!