Dale Fye
asked on
Add a percentage column to table which displays [Freq]/Sum([Freq])
You have to use formula fields
See this article for more information on how to create formula fields
https://www.tutorialgateway.org/calculated-fields-in-ssrs/
See this article for more information on how to create formula fields
https://www.tutorialgateway.org/calculated-fields-in-ssrs/
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
@Dale That's exactly what I suggested
To use formula fields
=Fields![Freq].Value/Repor tItem![txt _Total].Va lue is nothing but a formula field
To use formula fields
=Fields![Freq].Value/Repor
ASKER
Yes, but the piece you didn't provide was the piece I needed:
1. Name the textbox containing the sum([Freq])
2. Use the following as the denominator to get the percentage
Thanks for your suggestion.
1. Name the textbox containing the sum([Freq])
2. Use the following as the denominator to get the percentage
ReportItem![txt_Total].Value
I already knew how to use expressions in SSRS, just didn't know how to refer to the value in that textbox in the expression, and that was not covered by your response, or the article you linked to.Thanks for your suggestion.
I made up a dummy table and columns based on the left side. You'll see that in the fiddle link below.
As a separate column:
Open in new window
Computed in SQL:
Open in new window
Fiddle:
https://dbfiddle.uk/?rdbms=sqlserver_2019&fiddle=b2cbdbf1fb591cdac914e0232bf45e9e