Sunday, March 25, 2012

Calculated field with Percent

Hi,

I have a calculated field with percent format. However, the value of this field aggregates at every attribute i place on the browser. i want only to show this calculated field in the detail cell on. if the user tries to roll up, i must not be able to see any data in it.

Example

Problem: (View 1)

Service Job Discount Amount

1 200% 3000

2 40% 500

3 100% 400

As i drag the line number to the browser, i saw the right discount value:

(View 2)

Service Job LineNumber Discount Amount

1 1 100% 1500

1 2 100% 1500

2 1 40% 500

3 1 60% 100

3 1 40% 300

How can I make the discount blank on View 1 and only exists if i drag the line number? The problem in View 1 is it sums up the discount which is wrong.

cherriesh

Check whether you are in the right level:

CASE WHEN
[Dimension].CurrentMember.Level.Ordinal > 0
THEN [Measures].[Discount]
ELSE
NULL
END

More info and better recommendations here:
http://www.mosha.com/msolap/articles/mdxcomparinglevels.htm

Hope that helps,
Ibrahim

No comments:

Post a Comment