Reputation: 1
Pretty new to Stack overflow but hoping to get an answer to one of my project work
Region Sales Sales (LOD calculation only)
West 100 0
East 50 -50
North 200 100
What would the LOD calculation be to get 0,-50 and 100 in column Sales (LOD calculation only)?
I do understand that row 2 and row 3 are both subtracted from first row. It's easy to do with Table calculation but i am unable to figure the LOD part out
Upvotes: 0
Views: 147
Reputation: 11
To get sales like the one you displayed, to embed an if statement in an LOD calculation and subtract the initial sales from that number. You could write it as one big calc, but I'll break it down for simplicity.
{EXCLUDE[Region]:SUM(IF [Region]='West' THEN [Amount] END)}
Upvotes: 0
Reputation: 21
Welcome to Stack Overflow, i am also very new so hope i am helpful.
Looking at your requirement, i believe a LOD expression would not be valid for this. As you have mentioned you are already able to get your results using table calculations, which is the right approach for this type of problem.
LOD expressions are used when you need to do some aggregation in your data which is at a different grain then the selected dimensions.
Hope this helps.
Upvotes: 0