Forum Discussion

Msampedro's avatar
Msampedro
Helper I
8 months ago
Solved

Row subtotals blank

Hey all,

Need to view the subtotals for "Theorical consumption REN"

Building a matrix with following rows: Plant, GMC description, GMC and Billing GMC description. On the values: I have a measure "Theorical consumption REN". where the subtotals are not visualized. I believe that the issue is realted to de "SELECTEDVALUE" but no idea how to solve it.

Theorical consumption REN = [Cars Built]* SELECTEDVALUE('2. Price List'[Price (I)]

Thank you,

Miguel

10 Replies

  • Hi Msampedro 

     

     Try using SUMX and VALUES instead of SELECTEDVALUE. This iterates over each price in the current context and sums the result, which is often the most accurate for subtotals.

     

    Theorical consumption REN =
    SUMX(
        VALUES('2. Price List'[Price (I)]),
        [Cars Built] * '2. Price List'[Price (I)]
    )

     

    --------------------------------

    I hope this helps, please give kudos and mark as solved if it does!

     

    Connect with me on LinkedIn.

    Subscribe to my YouTube channel for Fabric/Power Platform related content!

    • Msampedro's avatar
      Msampedro
      Helper I

      Thanks wardy912 I would say that option does not work as the field '2. Price List'[Price (I)] is comming from table 2.Price List and I am trying to create the measure in a separate table "Measures table".

       

      Thank you,

      Miguel

      • wardy912's avatar
        wardy912
        Super User

        Hi Msampedro 

         

         I'm not sure I understand, surely all measures in your measure table reference other tables?

        Having a measures table is really just a placeholder for DAX.

         

        Are you able to provide a PBI file?

         

  • Hi Msampedro,

    I am not sure how bring the [Cars Built] value but could you please try with below DAX.

    Theorical consumption REN =
    SUMX(
        SUMMARIZE(
            'YourTable',
            'YourTable'[Plant],
            'YourTable'[GMC],
            'YourTable'[Billing GMC],
            "Value", [Cars Built] * MIN('2. Price List'[Price (I)])
        ),
        [Value]
    )

     

    Thanks,
    If you found this solution helpful, please consider giving it a Like👍 and marking it as Accepted Solution✔. This helps improve visibility for others who may be encountering/facing same questions/issues.

    • Msampedro's avatar
      Msampedro
      Helper I

      Hi ajaybabuinturi ,

       

      I have tried the formula, but something is not working. Cars Built is a measure, belonging to a 'Measures table'. As you can see below the rest of the fields come from two tables 'Material Mapping' and Qty ACT QP1'. Let me know if based on the additional info the approach will remain. Many thanks.

       

            SUMX(
          SUMMARIZE(
              'Material Mapping', // YourTable? Not sure
              'Material Mapping'[Plant],
              'Qty ACT QP1'[GMC],
              'Material Mapping'[Billing GMC],
              "Value" [Cars Built] * MIN('2. Price List'[Price (I)])
          ),
          [Value]
      )