Forum Discussion

stefanvermeulen's avatar
stefanvermeulen
Frequent Visitor
1 year ago
Solved

Understanding summarizing order lines

Hello,

 

I am rather new to Power BI and I am missing something elementary. 

 

I have a table with a lot of order lines and several dimensions (date, region, item category, item characateristic 1, item characateristic 2, ..). I am sure the relations are OK. Each order line has an amount / value. I would like to use the slicer to select the order lines on their property and get the sum of all values with that specific slicer filter.

 

Here I am stuck: the total value at the bottom is fine and represents the value according my selection. However, in the table, on each line, the amount shown is not correct. Here it gives totals, not taking into account all amounts that are filtered.

 

 

The bottom total is perfect. But the totals on each single line are not representing the slicer totals.

I am looking for the behavior that the column with the amount neatly adds up to the total.

I have learnt a lot reading this forum and made nice other calculations.. but did not solve my problem 🙂 

What am I missing here?

 

Stefan

  • stefanvermeulen's avatar
    stefanvermeulen
    1 year ago

    I solved it. I'm stupid. I was so convinced all relations were OK, .. BUT there was a relation indicated as "not active". I simply clicked it, and it worked. I don't know why it was not active. 

7 Replies

  • Deku's avatar
    Deku
    Super User

    Power BI is going to aggregate rows as much as possible. If you want to see individual lines, then the lines need to have all the fields that represent a unique row. This is most easily achieved if you have distinct key or index for each row that you include in your visual

  • Sorry, I need to clarify better, and I really don't understand what you mean. 

     

    Here's my table : 

     

    The bottom total is perfect. But the totals on each single line are not representing the slicer totals.

    I am looking for the beahvior that the column neatly adds up to the total.

    • Deku's avatar
      Deku
      Super User

      Can you share the data model view and the measure definition please

      • stefanvermeulen's avatar
        stefanvermeulen
        Frequent Visitor

        My fact table has :

        DeliveryDate
        Property 1
        Property 2
        Country
        ProdCategory
        CustomerNo
        DeliveryMehod
        ItemReferenceNo

        + SUM('salesOrderLines (advanced APIs)'[amount]))

         

        Each column is directly related to its corresponding dimension table using a 1 to many relation.

         

        I use the dimension tables for the filters.

  • v-pnaroju-msft's avatar
    v-pnaroju-msft
    Community Support

    Hi stefanvermeulen,

    We are delighted to know that your issue has been resolved. Kindly mark the response that resolved your query as the accepted solution. This will assist other community members facing similar challenges in finding solutions more efficiently.

    Please continue to utilise the Fabric Community for any further assistance with your queries.

    Thank you.