Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Get difference of rows from tables referencing to different databasets


Get difference of rows from tables referencing to different databasets

Author
Message
mayur.sidhpura
mayur.sidhpura
Forum Newbie
Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)

Group: General Forum Members
Points: 8 Visits: 225
I am trying to achieve something different, and hope if someone can help me with this. In my report, I have 2 datasets that has MDX queries that references to 2 different cubes. I created 2 tables to display the result of 2 datasets. Well my actual requirement is 3rd table, that will display the difference between values in 2 tables cell by cell. In my report, I don't even need to display 1 and 2 table, its just to used to get the records for 3rd table. Check the file attached, where I have my two tables. The 3rd table should have difference of cells values for every fiscal week.

I tried creating 3rd table without any dataset assigned to it, but it didn't work. I tried to use expression in text field to get the difference between to cells, but it works only for the first record.

I am really stuck at this point, please help!!
Attachments
SSRS_example.jpg (6 views, 57.00 KB)
geoff5
geoff5
SSC-Enthusiastic
SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)

Group: General Forum Members
Points: 188 Visits: 543
I would base the tablix on the BIPM dataset and then use an expression similar to this one for the value of each detail textbox in the tablix:

= Fields!ItemSales.Value - Lookup(Fields!FiscalWeekOfYear.Value, Fields!FiscalWeekOfYear.Value, Fields!ItemSales.Value, "BIPM Audit")

This expression returns the difference between the ItemSales value in the BIPM dataset and the ItemSales value in the BIPM Audit dataset for corresponding fiscal weeks.
mayur.sidhpura
mayur.sidhpura
Forum Newbie
Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)

Group: General Forum Members
Points: 8 Visits: 225
Worked like charm!!! Thanks a lot, I really appreciate that.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search