Forum Discussion
Using IF statement not resulting in correctly summed data
I might be able to help if you provide some detail on your measures and table relationships.
At first glance, it looks like a filter context issue. When you say IF NS Act Total = 0, then return NS Proj Total, otherwise NS Act Total, and you remove the filter context at the year summary level (the .383 value), you are in essence removing the filter. That's why I'm speculating that it could be a filter context issue.
- JC38 years agoFrequent Visitor
Sounds like on right track, b/c I've noticed that depending on the data range I use to review table, the summed value changes e.g. if I just look at Sept-Dec values, it just sums those.
The way the data goes together:
[NS Act Total] = sum([NS Act]) where [NS Act] is a column of sales data for a variety of countries, by month.
[NS Proj Total] is created same way from another column.
There's a separate date table that's associated with the fact table.
If using the IF statement in this way is the problem, interested in a solution that would combine these two measures.
- JC38 years agoFrequent Visitor
Bump
- GabrielSantos8 years agoResolver I
Just to clarify, you are happy with the measure as it exists on the table, but when it is summarized at the grand total level, you want it to sum the two measures together?