Forum Discussion

AbbasG's avatar
AbbasG
Icon for Memorable Member rankMemorable Member
3 years ago
Solved

NEED HELP WITH SIMPLE DAX

Hello All,   I have created a simple measure to calculate margin value (Total sales - total cost). However, for a few lines, it gives weird results.   An example is below in blue that my Dax meas...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi  AbbasG ,

    Does your data contain data with the same column and different values:

    When placed on a Visual, the same [Model] is aggregated together.

    If you use the Max() function in your Measure, the maximum value of each [Model] will be taken, not the total aggregate value.

    You can use the Sum() function to get the aggregate value:

    Sum_Measure =
    SUM('Table'[Value1]) - SUM('Table'[Value2])

    Best Regards,

    Liu Yang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.