Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago

Need help with Column Total

I have a visual that contains a cloumn and a mesuare. The Total row for the Column has the correct value. The Total row for the Measure is incorrect. How can I get the Total for the mesaure to be correct. It should be 9. I'm experiencing this issue in a Table visual. My Measure contains the following: 

SUM('Adjusted'[Multiplier]) * COUNTa('OUT'[TKT_NO])

 

           Column     Measure 

                3                3

                3                3

                3                3

Total        9               15

 

Thanks for your help

5 Replies

  • You cannot measure a measure directly. Either materialize it first, or create a separate measure that implements the entire business logic.

    • Anonymous's avatar
      Anonymous
      Not applicable

      lbendlin, What do you mean by materializing it first?

      Thanks

      • lbendlin's avatar
        lbendlin
        Super User

        Use it in a SUMMARIZE or SUMMARIZECOLUMNS and then SUMX over the virtual table.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

    Please try a measure like this one:

    MEASURE =
    SUMX (
        VALUES ( 'Table'[Grouping Field] ),
        SUM ( 'Adjusted'[Multiplier] ) * COUNTA ( 'OUT'[TKT_NO] )
    )

    For more information on why the totals are incorrect you can refer to:
    Obtaining accurate totals in DAX - SQLBI
    Why Power BI totals might seem inaccurate - SQLBI

    Best Regards,
    Gao

    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
    If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    How to get your questions answered quickly --  How to provide sample data in the Power BI Forum -- China Power BI User Group

    • Anonymous's avatar
      Anonymous
      Not applicable

      Gao, Thanks for the suggestion. Unfortunately that formula still gives me a Total that is much higher than what it should be. Do you have any other suggestion?