Forum Discussion

SaaM's avatar
SaaM
Helper II
9 months ago
Solved

DAX total != total rows

Hi,  I have an issue where the total of the rows is not equal to the total calculated in a table, let me explain what I mean:  I calculate first the difference between the CA N and CA N-1 t...
  • DataNinja777's avatar
    DataNinja777
    8 months ago

    Hi SaaM ,

     

    It is likely that your total doesn't work because you have multiple columns which is affecting your filter condition.  In order for the sumx solution to work you will need to incorporate all the filter condition columns into your sumx formula.  An example of the formula is as shown below:

    Calcul_incremental_Total = 
    SUMX(
        SUMMARIZE(
            'YourTable', 
            'YourTable'[Column1], 
            'YourTable'[Column2]
        ),
        IF([diff_CA] > 0, [diff_CA], 0)
    )

     Would you like me to generate the exact dax formula to fix the total? If so, please let me know which columns are currently listed in the rows section of your table visual.

     

    Best regards,