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

Sum(IF issue

Hello,

I have a dashboard that contains snapshot dates (what our data looked like at a certain time) in order to look at change from one date to another. We recently brought in Goals data.  I want to use a sum(if statement to link the goals to the territories they belong to. However the statement seems to be aggregating the goal data accross all snapshot dates . If I select one snapshot date, I get the aggregation of every date before it. Is there any way to stop this if statment from agrregating?

Thanks,

Jeff

4 Replies
swuehl
MVP
MVP

Jeff,

the if() statement is not aggregating, the sum() is doing that.

Could you please post your complete expression together with a more detailed description of your data model?

Your Goal data seems not to be correctly linked to your snapshots, or your aggregation expression might miss something, I and probably also others couldn't tell without some more information.

Also a small sample app could speed up things, if possible.

Regards,

Stefan

Not applicable
Author

Hi Stefan,

Thanks for the response. My objective is to display sales results and corresponding goals in the same object. My expression looks like this.

Sum(if( Goal Territory Name=Territory Name ,Goal,0))

I am using this expression with TerritoryGroupName as a dimension. If I use set analysis ie

Sum({$<Goal Territory Name=Territory Name>}Goal)

I do not get any results.

I have attached a simplified down version of the data model.

Thanks so much!

swuehl
MVP
MVP

Sorry, I can't open your file, what is the format / origin of this? If it's a not too complicated data model, a screenshot of the table viewer might already do the job. At best, you could try building a small sample QV app and upload it.

Not applicable
Author

Sorry, It's a microsoft publisher file Here is a screen shot.

Thanks!