en
Welcome Guest! To enable all features please Login or Register.
Options
Go to last post Go to first unread
SO  
#1 Posted : Friday, December 5, 2014 12:40:23 PM(UTC)
SO
Rank: Advanced Member

Groups: extranet\Forum
Joined: 8/19/2014(UTC)
Posts: 88

I have a cross tab with comparison groups; one sales column and one cost column and one calculated column (sum(d-1, 0, m1) / sum(d-2, 0, m1)).

The calculation works for all rows, but in my total row at the top I have no value in the sales and cost columns and 0 in my calculated column.

I want the total sales, total costs and total sum(d-1, 0, m1) / sum(d-2, 0, m1) at the top.

How can I solve this?

Edited by user Friday, February 13, 2015 11:42:56 AM(UTC)  | Reason: Not specified

Páll Bjarkason  
#2 Posted : Saturday, December 6, 2014 9:15:42 PM(UTC)
Páll Bjarkason
Rank: Advanced Member

Groups: extranet\Forum
Joined: 1/13/2012(UTC)
Posts: 164

Hello SO

You can use the same method as show in the last post: Calculating an average per dimension member
You can take a close look at the calculation in the screendump.

The point is to check if there are any visible children. This is true for the total. Hence you can have one calculation for the total and another for the rows.

total (parent)
row (child)
row (child)
row (child)

if Count(d1, all(v,c), m1) > 0
then [total calc]
else [row calc]

Edited by user Saturday, December 6, 2014 9:19:52 PM(UTC)  | Reason: Not specified

Best regards

Páll, CTS
Users browsing this topic
Anonymous
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Notification

Icon
Error