Forum Discussion

LuizPoleza's avatar
LuizPoleza
Frequent Visitor
1 year ago

Matrix and tables total incorrect

Hello there, I need some help

 

One of my users noticied that the totals being shown on matrix (and I tried on a table, same wrong results) are wrong.

See the example below. It is "missing" 1 quantity in both collumns, and I tried filtering everything to see if I can get the missing row, but I didn't find it.

When exporting to Excel and doing a sum, the totals are correct.

Then, I went back to PBI and by using a calculator, I manually sum every single row I can see on the matrix, and it was RIGHT!

So, the data is not wrong, but the total itself.

 

 

For the calculated collumn, this is the DAX

 

CALCULATE(
    DISTINCTCOUNT(FuncionariosAtivos[Matricula]),
    FuncionariosAtivos[DATA] = Today()
)

 

 

Here is a pastebin link for the exported DATA (CSV format)

https://pastebin.com/J21gcJnb

 

Can you provide some help? This is driving me nuts!

 

EDIT: there are no filters on the page and on the visual

5 Replies

  • You should use a measure and not a calculated column, the total row does not simply sum the visible rows; instead, it evaluates the DAX formula in the total context :

    My Measure = SUMX(
        FILTER(
            FuncionariosAtivos,
            FuncionariosAtivos[Realizado] >= 0
        ),
        FuncionariosAtivos[Realizado]
    )
    

     

     

    • LuizPoleza's avatar
      LuizPoleza
      Frequent Visitor

      Hi AmiraBedh 

      Thank you so much for your time. I really appreciate.

       

      I am not using a calculated collumn. "Realizado" is a DAX measure.

      I didn't understood. Can you further elaborate?

  • LuizPoleza's avatar
    LuizPoleza
    Frequent Visitor

    Hi AmiraBedh 

    Thank you so much for your time. I really appreciate.

     

    I am not using a calculated collumn. "Realizado" is a DAX measure.

    I didn't understood. Can you further elaborate?

      • LuizPoleza's avatar
        LuizPoleza
        Frequent Visitor

        Hi Anonymous 

        I´m sorry, can you tell which sample data you need?

        I´ve provided the example on pastebin on the first post, as per AmiraBedh tried in her solution