SSRS MATRIX InScope formula - get percentage of sales in group against total sales in row - HELP!

This is my most puzzling issue ever. I have 1 row with 4 nested groups below it. I inserted a total column to the left of the Column Group. The calculations (Sales and Pct) on the Total are correct. The Group has two body cells. Sales and Pct (percent of sales). Sales is the value in the expression. For each group, I want the percentage of sales against the total sales at each row group.
This is giving me an error.
=IIF(INSCOPE ("Matrix1_DivN")    AND ("Matrix1_Brand"),Fields!Sales.Value/SUM(Fields!Sales.Value),
  IIF (INSCOPE ("Matrix1_RegN")  AND ("Matrix1_Brand"),Fields!Sales.Value/SUM(Fields!Sales.Value),
  IIF (INSCOPE ("Matrix1_AreaN") AND ("Matrix1_Brand"),Fields!Sales.Value/SUM(Fields!Sales.Value),
 IIF (INSCOPE ("Matrix1_Store") AND ("Matrix1_Brand"),Fields!Sales.Value/SUM(Fields!Sales.Value),
  IIF (INSCOPE ("Matrix1_StoreN") AND ("Matrix1_Brand"),Fields!Sales.Value/SUM(Fields!Sales.Value),
  0  ))))  )

Help please! I havce been at this for two days and its due tomorrow!
Who is Participating?
EmesConnect With a Mentor Commented:
=IIF(INSCOPE ("Matrix1_DivN")    AND INSCOPE ("Matrix1_Brand"),Fields!Sales.Value/SUM(Fields!Sales.Value),
  IIF (INSCOPE ("Matrix1_RegN")  AND INSCOPE ("Matrix1_Brand"),Fields!Sales.Value/SUM(Fields!Sales.Value),
  IIF (INSCOPE ("Matrix1_AreaN") AND INSCOPE ("Matrix1_Brand"),Fields!Sales.Value/SUM(Fields!Sales.Value),
 IIF (INSCOPE ("Matrix1_Store") AND INSCOPE  ("Matrix1_Brand"),Fields!Sales.Value/SUM(Fields!Sales.Value),
  IIF (INSCOPE ("Matrix1_StoreN") AND INSCOPE ("Matrix1_Brand"),Fields!Sales.Value/SUM(Fields!Sales.Value),
  0  ))))  )
Laura2112Author Commented:
thanks so much!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.