Hi, not sure if I'm in the correct forum but my query is as follows.(apologies if I am in the wrong area).I’m working on a report in BIDS linked back to a view in SQL ServerI have several several rows with no grouping applied in my current report, built manually not using the wizard.The underlying data is to do with questionnaires returned and the answers provided from a multiple choice question set .[b]IE: [/b][b]Q14 – Did you enjoy your stay?[/b]A) NOB) SlightlyC) Yes[b]Q34 – Would you come again?[/b]A) YesB) Possibly C) If the price was rightD) MaybeE) NoFrom each question the answers are divied into + and - responses so a % can be calculated.So far I have the following working fine via the scripts I have built in the Expression Builder…..For Q14 I have ….=SUM(IIF(Fields!Q14.Value = "C" ,1,0)) / SUM(IIF(Fields!Q14.Value > "0" ,1,0))Only “C” is a positive answer. Bear in mind I have used the > “0” to exclude questions that have no asnswer applied , as with Q34=(SUM(IIF(Fields!Q34.Value = "A" ,1,0)) +SUM(IIF(Fields!Q34.Value = "B" ,1,0)) +SUM(IIF(Fields!Q34.Value = "C" ,1,0)) +SUM(IIF(Fields!Q34.Value = "D" ,1,0)) -- [b]Exclude E) as negative answer[/b]) /SUM(IIF(Fields!Q34.Value > "0" ,1,0))( the %’s below are based on positive answers given )Months - May June JulyQ14 - Did you enjoy your stay? 80% 80% 60%Q35 - Would you come again? 60% 70% 10%[b]What I need to do is add a total % for both questions combined. So I can display it as follows:..[/b] [b]May June July[/b]Q14 - Did you enjoy your stay? 80% 80% 60%Q35 - Would you come again? 60% 70% 10%[b]TOTAL For Group 70% 75% 35%[/b][b]Q? - How do I go about combining the 2 working scripts to produce a grouped % within a new cell in my table ?[/b]Thanks in advance for any replies / suggestions (even if i might be on wrong forum )P.
↧