locked
Writing an SSRS Expression using Scope or Variable? RRS feed

  • Question

  • I have created a heat map and it is working pretty well. The only issue I am having is that the expression for the fill is using "DataSet1"

    =Code.GetHeatmapColor(sum(Fields!AnnualPremium.Value),Min(Fields!AnnualPremium.Value,"DataSet1",Recursive),

    Max(Fields!AnnualPremium.Value,"DataSet1",Recursive))

    This is making the heatmap look at the whole dataset instead of just what I am grouping by. Within the Dataset there are Regions and Credit Unions. Since the Dataset is looking at an entire region, the heatmap is coloring based on all data for the region. I need to heatmap to color based on the Credit Unions in that region. The Credit Unions are a group. I need the group to be the value it is referencing in the heat map and not "DataSet1". I have been told to use scope or a variable but cannot get it to work correctly. Any Ideas?

    Thursday, May 21, 2015 3:52 PM

Answers

  • Try putting the name of the group in place of the dataset. If your group name is "credit unions":

    =Code.GetHeatmapColor(sum(Fields!AnnualPremium.Value),Min(Fields!AnnualPremium.Value,"credit unions",Recursive),Max(Fields!AnnualPremium.Value,"credit unions",Recursive))



    Don't forget to mark helpful posts, and answers. It helps others to find relevant posts to the same question.

    Thursday, May 21, 2015 3:55 PM

All replies

  • Try putting the name of the group in place of the dataset. If your group name is "credit unions":

    =Code.GetHeatmapColor(sum(Fields!AnnualPremium.Value),Min(Fields!AnnualPremium.Value,"credit unions",Recursive),Max(Fields!AnnualPremium.Value,"credit unions",Recursive))



    Don't forget to mark helpful posts, and answers. It helps others to find relevant posts to the same question.

    Thursday, May 21, 2015 3:55 PM
  • Perfect. Thank You! I kept using "Fields!Credit_Union_Name.Value" instead of "Credit_Union_Name".
    Thursday, May 21, 2015 4:45 PM
  • Hi RobTencents,

    It seems that the issue is resolved by Partick’s suggestion, right? If issue persists, please feel free to ask.

    Best regards,
    Qiuyun Yu


    Qiuyun Yu
    TechNet Community Support


    Friday, May 22, 2015 6:00 AM