I have a total invoice amount that can appear in several sections of my report but I only want to sum (grand total) for the single instance of the invoice in the entire report. I cannot seem to get the context right to do this. Any ideas?
Why would your ātotalā appear in several sections? Are you refering to WEBI āSectionsā or are you really saying ādifferent areasā?
Sections in WEBI are a sub-set of your original data, filtered on a particular dimension.
We need more information to point you in the right direction⦠but the big question in my mind is whether or not that grand total thatās appearing is in the raw data output from the SQL as a row, a column, or not at all.
Each section is a grouping by a catetgory.
Each category is summed up and matches nicely.
But the total we want is not the sum of the categories because we are only looking to sum up the single instance of the invoice.
In other words Invoice 1234 can appear in section 1, section 2, and section 3. The invoice amount is included in each of these totals. But the complete sum of the report should only equal one instance of Invoice 1234 for $100 not as it appears in each section for a total of $300.
I hope this helps you understand what I am trying to achieve.
I believe what you want to use is the āFOREACHā option with your sumā¦
Something like Sum(Amount) ForEach Invoice
I donāt have BOBJ access at the moment so this is off the top of my head⦠let me know if it works and if not Iāll double check tommorrow when I get in the office.
Ckh, did you put that sum statement OUTSIDE of your section break? If so and itās still not working, dump a few lines from your data into Excel and post them if you can so we can get an idea of the underlying data.
If you make a formula outside of your section break we donāt have to worry about any special filters, sections or block restrictions.
It should work so Iām thinking the data you have isnāt what is in our heads.
I canāt really export it to Excel but I have generated a small sample and attached it. You will see in the example that the Grand Total is showing 1050 but should be only 750.
Let me know any ideas you have. Sample 1.xls (18.0 KB)
Hmm it should work, thatās how I thought it was laid outā¦
Double check that your total is outside of any sections and perhaps even include another piece to the formula to be sureā¦InReport should do the trick⦠though it should be functioning correctly without itā¦
Have you tried / are you able to create a second query returning invoice id and the sum total? So a distinct record of the singular amount. I presume invoice no would work as a linking dimension and maybe enable you to get to that distinct value in your report?