Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calculated Measures based on conditions

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi
I have a cube that has several measures. A couple of the measures need to be conditional:
ie. Measure1 = sum of orders where prod type = 'abc'
Measure2 = sum of orders where prod type = 'def'

I figure I will have to create calculated measures for this but can't work out the correct statement for the above

IIF(prod type = 'abc', sum orders, 0) does not work ... where am I going wrong? :)

Thanx

Vamp
 
Try this:

sum( iif( prod type = 'abc', order_value, 0 ) ) = Measure 1
sum( iif( prod type = 'def', order_value, 0 ) ) = Measure 2
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top