SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 Analysis Server and Reporting Services (2005)
 Highlight duplicates with expression
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

infodemers
Posting Yak Master

Canada
181 Posts

Posted - 11/19/2013 :  16:10:32  Show Profile  Reply with Quote
Hi,

I wish to change the background color when a duplicate based on two columns values is created.
I have tried the following but no success.

=NPANXX(Count(Fields!NPA.Value & Fields!NNX.Value, "NPANNX") >1, "LightBlue")


Thanks!

visakh16
Very Important crosS Applying yaK Herder

India
52249 Posts

Posted - 11/20/2013 :  02:21:54  Show Profile  Reply with Quote
I think you need to use rowNumber function for this.
Something like

IIF(RowNumber("YourGroupName") > 1 ,"LightBlue","Whatever color you want")

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

infodemers
Posting Yak Master

Canada
181 Posts

Posted - 11/20/2013 :  11:10:29  Show Profile  Reply with Quote
Hi Visakh16,
Thanks for helping me with this.

I have a question. Am I okay when creating the Group(NPANNX) to write the expression =Fields!NPA.Value+Fields!NPA.Value

When I write for the background properties your suggestion:
IIF(RowNumber("NPANNX") > 1 ,"LightBlue","Transparent")

It highlights all the rows except the first one.

Thanks
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52249 Posts

Posted - 11/20/2013 :  13:07:03  Show Profile  Reply with Quote
quote:
Originally posted by infodemers

Hi Visakh16,
Thanks for helping me with this.

I have a question. Am I okay when creating the Group(NPANNX) to write the expression =Fields!NPA.Value+Fields!NPA.Value

When I write for the background properties your suggestion:
IIF(RowNumber("NPANNX") > 1 ,"LightBlue","Transparent")

It highlights all the rows except the first one.

Thanks


What according to you are duplicates?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

infodemers
Posting Yak Master

Canada
181 Posts

Posted - 11/20/2013 :  13:14:11  Show Profile  Reply with Quote
Let's say I have a table as follow:

NPA|NNX|Cie|remarks|
418|220|abc|pending|
418|220|abc|completed|

418|222|abc|open|
418|223|def|closed|

I wish to see the duplicates based on the combination of NPA and NNX.
In my example, the NPA 418 and NNX 220 are in blue.

Thanks!
Go to Top of Page

infodemers
Posting Yak Master

Canada
181 Posts

Posted - 11/20/2013 :  14:04:04  Show Profile  Reply with Quote
Hi,
I got it to work using the following expression:
=Switch(Count(Fields!NPA.Value+"-"+Fields!NNX.Value, "NPANNXID") > 1, "LightBlue", Count(Fields!NPA.Value+"-"+Fields!NNX.Value, "NPANNXID") = 1 , "Transparent")


Thanks!
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000