Add total with different in percentage in SRSS Power BI report builder - reporting-services

I have a matrix with sales for district and store on the rows and different "time intelligence" on columns. I want to add totals. It works fine for values but for "YOY %" I don't want to sum the individual percentages of course - I want to have the total YOY for the values on the total row. How can I refer to these values? See the picture, the red value should be 109/77-1 = 42 % and not 183 %.
Any input is appreciated.
enter image description here
enter image description here

To answer my own question: I didn't figure out a way to referring to columns generated from calculation groups (is it even possible?) so instead I created all the measures (columns) as seperate columns in the dataset. Then I can easily refer to them like YOY %:
=( Sum(Fields!Actual.Value) - Sum(Fields!PY.Value) ) / Sum(Fields!PY.Value)
and the totals is shown correctly.

Related

How to sum a row based on the total group in SSRS

Im facing an issue whereby how to sum the % for each of column based on group in SSRS by using expression. Refer my use case below
I have one outcome which all the product with a percentage result. Refer to my screenshot
enter image description here
Below are my SSRS template.
enter image description here
How we get percentage result. Example: Product PG is based on 13(based on total PG) divide 51(total Inv)
Issue: I want to sum each of percentage result for all the item Example 25% + 41% + 4% and etc to populate under excel column V6.
Therefore i need some ideal how to write in SSRS expression or it only can done via query.
Seek for any ideal how can this be done.
You can try as below since you have use static columns:
=(Sum(TotalTintCash)/Sum(TotalInv)+Sum(TotalTintFOC)/Sum(TotalInv))
And then, you can provide number formatting to percentage

SSRS percentage of a total with column groups

I apologize in advance if this is not enough info or if it is confusing (This is my first post to the forum and it's a little hard to explain what i'm trying to do). I have been researching this for a couple days now. This article comes really close to what I need, but this person did not have column groups, just a a single column with an output: SSRS percentage of a total.
Consider this layout and groups:
The idea is to provide the percentage of the total records per PrimaryPayor per Company and then break it out by Year-Month.
This expression:
=CountDistinct(Fields!ID.Value, "Primary_Payor") / CountDistinct(Fields!ID.Value, "Company")
Results in this output (The first image is my output, the second is the desired output):
As you can see, the percentages do NOT group by Year-Month, instead just provides the total percentage of IDs per Payor per Company and repeats it for every Year-Month column. How can I get the percent of Total IDs per payor, company, and month as it shows in the second result image?
After editing my question, I thought of something I hadn't tried.
If I just use =CountDistinct(Fields!ID.Value), this gives the total count for each payor, company, month, plus, I added a Total row.
Then, if I reference those textbox values (instead of trying to calculate the percentage on the fly) divided by the total row, I get my results. I just had to add a column inside of the column group. I should then be able to just Hide my "total" column and display only the percentages.
=ReportItems!Textbox50.Value / ReportItems!Textbox35.Value
Here is the output (with the total counts and then after hiding the "count" column):
Final Results
Try:
=CountDistinct(Fields!ID.Value) / CountDistinct(Fields!ID.Value, "Company")
I removed the Primary_Payor scope leaving the function calculate the count in the cell scope Primary_Payor and DOS_YrMo.
UPDATE:
=CountDistinct(Fields!ID.Value) / CountDistinct(Fields!ID.Value, "DOS_YrMo")
Let me know if this helps.

Add percentage to SSRS report

I have a table in my SSRS report.
As you can see to the right hand side I have a column called %.
How can I calculate this?
The only way I know how is to take the [Count(AssetId)on the row above the total line (this is Textbox11) and divide it by the [Count(AssetId)in the total row (this is Textbox8). So basically how do I dive two text boxes together?
So basically I want to divide the 573 by 1025 (my total) in order to get a percentage.
Try this expression in the % column:
=Count(Fields!AssetId.Value)/Count(Fields!AssetId.Value,"DataSetName")
Change DataSetName by the actual name of your dataset.
Let me know if this can help you.

How can I sum "Expr" in bottom of the table in SSRS?

I'm doing such a thing;
=Sum(Fields!TOTAL.Value) - Sum(Fields!IND.Value)
In cells, so this is end up with expresion "<<'Expr'>>", that means I'm finding net worth price - discount for each saled products, after that I want to sum all of those product's sales on bottom, like
=Sum(Sum(Fields!TOTAL.Value) - Sum(Fields!IND.Value) )
Any chance for that? I also tried like;
=Sum(ReportItems!TOTALBOX.Value)
But not work either.
Edit;
I'm doing something like that but on final, I want to sum those values which "<>" created.
Thx.
Since your data is in a Column Group (by [DEFINITION_] - the 3 columns with the line above them) you can create a total column using the same formula. The Total will SUM all the different DEFINITION groups for each [NAME] group.
You can add a column Outside the group and create your total column with the same formula
=Sum(Fields!TOTAL.Value) - Sum(Fields!IND.Value)
If you created everything correctly (and you're lucky), SSRS might be able to create the Total for you by right clicking on the cell and Add Total.

How can I add an aggregate percentage to an SSRS report based on two specific columns in a matrix?

I am somewhat new to SSRS and I have built a matrix report that looks fairly simple:
Supplier [AccDate]
[SupplierName] Sum(PurchasingCredit)
Total <<Expr>>
The actual report shows month-by-month sales data for a year in addition to Current YTD and Previous YTD columns (joined via UNION clause in base query) in addition to a column showing Year-over-Year % as difference between the Current YTD and Previous YTD columns (also joined via union).
I was able to apply a dynamic format to the Year-over-Year column using the following expression in the Format property to show the YOY column as a percentage and the others as dollar amounts:
=IIF(Fields!AccDate.Value <> "YOY", "'$' #,0.00;'$' -#,0.00", "#,0.00 %;-#,0.00 %")
The last thing I need to do is to show the column totals, which are working for each column with the exception of the year-over-year percentages using the following:
=IIF(Fields!AccDate.Value <> "YOY", SUM(Fields!PurchasingCredit.Value), 0)
In the year-over-year (YOY) column, a sum of percentages doesn't make sense: I need it to recalculate this value based on the sums of the "CYTD" and "PYTD" columns, but I can't seem to figure it out. Any help would be greatly appreciated. I am guessing it is probably an application of scope, but the MS articles that attempt to explain this are very confusing.