Forum Discussion

Shrey03's avatar
Shrey03
Regular Visitor
2 years ago
Solved

Incorrect values using Sumx function

Hi All,

 

I have Base table - Table 1 (Screenshot below) and derived - Table 2 (Screenshot below) where SumColumn1 and SumColumn2 totals are coming correctly whereas the highlighted value sum is not coming correctly. Correct sum of that column is 8672600. DAX for the measure is present in screenshot

 

Table 1

 

Table 2

Can someone please help with the correct DAX measure?

  • You can try ...

    TestNum = 
    var _vTable =
    SUMMARIZE(
        Sheet1,
        Sheet1[Type], Sheet1[Category],
        "_value", SUM(Sheet1[Column 2]) - SUM(Sheet1[Column 1])
    )
    Return
    SUMX(
        _vTable,
        ABS([_value])
    ) * 100

2 Replies

  • You can try ...

    TestNum = 
    var _vTable =
    SUMMARIZE(
        Sheet1,
        Sheet1[Type], Sheet1[Category],
        "_value", SUM(Sheet1[Column 2]) - SUM(Sheet1[Column 1])
    )
    Return
    SUMX(
        _vTable,
        ABS([_value])
    ) * 100
    • Shrey03's avatar
      Shrey03
      Regular Visitor

      Hi jgeddes 

       

      Thank you so much. This helped. Accepted this as a solution