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 2008 Forums
 Analysis Server and Reporting Services (2008)
 countif or lookup
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

tech2
Starting Member

40 Posts

Posted - 11/06/2013 :  14:44:12  Show Profile  Reply with Quote
I'm trying to use lookup or an if statement to reference another item number. for example:

I've got a table with part number 'WidgetB' and the upper level number is 'MasterWidget'.

How can I instruct lookup or the if statement to indicate the count on 'WidgetB' whenever the report picks up 'MasterWidget'.

I hope this not to confusing. Basicly I'm trying to reference 'MasterWidget' to allocate against 'WidgetB'.

Report Builder 3.0 R2 2008

Thanks,

visakh16
Very Important crosS Applying yaK Herder

India
52325 Posts

Posted - 11/07/2013 :  03:26:13  Show Profile  Reply with Quote
so is it always just one level relatioship or can it go multiple levels? like MasterWidget->WidgetB-> xxxxxx. in that do you want to include count recursively until last level?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs

Edited by - visakh16 on 11/07/2013 03:26:27
Go to Top of Page

tech2
Starting Member

40 Posts

Posted - 11/07/2013 :  09:01:28  Show Profile  Reply with Quote
Only one relationship / level - Below are the Column Names and one line of data.

ItemNumber - QOH - Alloc. - AVL.

WidgetB - 2 - <EXP> - 1

the expression would look at the 'ItemNumber' field in another dataset to lookup any occurence of 'MasterWidget' and plance in the 'Alloc' column of 'WidgetB'. From there I can recalculate the 'AVL'.

thanks,
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52325 Posts

Posted - 11/07/2013 :  09:08:21  Show Profile  Reply with Quote
is <EXP> an expression stored as a column value? is your attempt to execute it and get the resulting value?

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

tech2
Starting Member

40 Posts

Posted - 11/07/2013 :  11:56:00  Show Profile  Reply with Quote
yes, the <EXP> would be stored in the new added 'Alloc' column.

My problem is; All my expressions have failed. Below is a Lookup I'm performing on another field and it's working. I just don't know how to include the 'if' statement or expressiong to convert my 'Widget' senerio.

=LookupSet(Fields!ItemNumber.Value, Fields!ItemNumber.Value, Fields!ItemNumber.Value,"DataSet15").Length
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.06 seconds. Powered By: Snitz Forums 2000