Forum Discussion

KPRL's avatar
KPRL
Frequent Visitor
3 years ago
Solved

Aggregation in Power BI Report Builder (Paginated report)

Hello,

I am trying to create a paginated report where trying to show Region,State and Sales as per below screenshot. Every state can have multiple sales and I want to populate sum(sales) at lowest level. 

 

I am using expression as =sum(Fields!Sales.Value) for sales column . However, Data doesnot aggregate at state level. It returns table as input file while running the report.

Could anyone please guide me ?

 

Thanks,

KP

 

6 Replies

    • KPRL's avatar
      KPRL
      Frequent Visitor

      Hi Shahfaisal ,

       

      Thanks you.

      I tried to create a group and aggregated the Sales. Added State(Sate- sorry for typo in the first post)  as  scope. However, output is coming something like below screenshot where sales value is repeating for each Id (ID column added letter).

      So my current Input data looks like :

      Output that I am getting is :

       

      So, for each State I am getting 2 duplicate sales values instead of one value.

      Output should be like:

       

      Can you please help mw with this ?

       

      Thanks,

      KP

       

      • Shahfaisal's avatar
        Shahfaisal
        Icon for Solution Sage rankSolution Sage

        From the screen shpt, it looks like you are missing a group sub-total. Please go through the article I shared in my previous response and look at the totals section.

        Adding totals to a report

        1. Switch to the Design view.

        2. Right-click the data region cell that contains the [LineTotal] expression, and select Add Total. Report Designer adds a row with a sum of the dollar amount for each order.

        3. Right-click the cell that contains the field [Qty], and select Add Total. Report Designer adds a sum of the quantity for each order to the totals row.

        4. In the empty cell to the left of the Sum[Qty] cell, type the string "Order Total".

        5. You can add a background color to the totals row. Select the two sum cells and the label cell.

        6. From the Format menu, select Background Color > Light Gray square.

        7. Select OK to apply the format.