Share via

Sum values in column B corresponding to distinct values in column A in Report Builder

Murali5431 21 Reputation points
2021-06-19T14:00:12.097+00:00

Hi,

I am using a power BI dataset to prepare a report in Report Builder. There are duplicate rows in the dataset.

I need help to build an expression in Report Builder Tablix to add up values of "Height" for distinct values of "Package". Hence sum should be 110+3+3+34+13+34+69+34 = 297.

I was initially suggested to modify the dataset by an SQL statement, which I am not able to do. So I am trying to build an expression in Report builder without modification to source data. Can that be possible. Please help!

Package Height
A 110
A 110
B 3
B 3
B 3
B 3
C 34
D 13
D 13
D 13
E 34
E 34
F 69
G 34
G 34

Thanks,
Muralidhar

SQL Server Reporting Services
SQL Server Reporting Services

A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.


2 answers

Sort by: Most helpful
  1. VJ-5333 1 Reputation point
    2021-06-21T13:27:13.75+00:00

    Hello,

    Use the column grouping in place of column only. It will solve your issue.

    http://www.sqlcircuit.com/2013/09/ssrs-how-to-filter-report-data-at.html

    Thanks,
    VJ

    If the answer is helpful, please click "Accept Answer" and upvote it.

    Was this answer helpful?

    0 comments No comments

  2. Joyzhao-MSFT 15,651 Reputation points
    2021-06-21T06:41:17.22+00:00

    Hi @Murali5431 ,
    If you are using PowerBI products, please consult the Power BI Community. You mentioned earlier to create reports in Power Builder. Perhaps you should consult an expert familiar with the product to solve your needs.
    Assuming you are using SSRS products, I suggested was that you should go back to the source of the data and perform the operations there and use SSRS to display it. Because indeed I can't think of any other way to achieve your needs. I would be very grateful for any other solutions from other experts. I will attach a link to the previous case and the solution I have proposed:https://learn.microsoft.com/en-us/answers/questions/435220/summing-values-in-column-for-duplicate-rows-in-tab.html
    Best Regards,
    Joy


    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.