Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Evaluate iif in a MAtrix

Posted on 2012-03-16
3
418 Views
Last Modified: 2012-03-25
Does anyone know why this IIF statement only evaluates once when it is in a Matrix but works ok outside the matrix ?

=IIF(LTRIM(RTRIM(Fields!USERDEF1.Value)) <> ("OTHER")
AND (LTRIM(RTRIM(Fields!USERDEF1.Value)) <> "KEY ACCOUNT" AND SUM(Fields!ID0_3_MTHS.Value) >0 )
 ,Fields!NoinGroup.Value, SUM(Fields!ID0_3_MTHS.Value))
0
Comment
Question by:NETFOCUS
  • 2
3 Comments
 
LVL 22

Expert Comment

by:Nico Bontenbal
ID: 37729313
Depends on the layout of you matrix. But shouldn't the formula be:
=IIF(LTRIM(RTRIM(Fields!USERDEF1.Value)) <> ("OTHER")
AND (LTRIM(RTRIM(Fields!USERDEF1.Value)) <> "KEY ACCOUNT" AND SUM(Fields!ID0_3_MTHS.Value) >0 )
, SUM(Fields!ID0_3_MTHS.Value) ,Fields!NoinGroup.Value)

Open in new window

Now you're only showing the sum if it's <= 0. I you need further help please provide a small sample of your data, the layout of your matrix, the desired result and the version of SQL Server.
0
 

Accepted Solution

by:
NETFOCUS earned 0 total points
ID: 37741725
I had to add another column group with a constant value in it an now it works.
0
 

Author Closing Comment

by:NETFOCUS
ID: 37762348
Making this change worked.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: This article is aimed at report developers who are used to developing reports using relational databases and have gotten a first-time assignment to develop reports on OLAP cubes. It demonstrates how to build a report using SQL Ser…
Hi All, I am here to write a simple article to move SSRS (SQL Server Reporting Services) reports from one server to another. When I have faced the same issue to move reports those were developed by developer on development server and now need to …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question