Forum Discussion

JoanElGran1899's avatar
JoanElGran1899
Frequent Visitor
4 years ago
Solved

Sum Total Data Diff with one min(data created) and other max(data) about diferent tables

Hi everyone,
May I ask for some help with an issue me and my team are facing.


We are trying to sum the time our team spent doing invoices. So we are taking from 'Dim Invoice' (table) the doc num, created by and the data created and from another table the time about the last line they done.
But the sum as you can see is not correct... The total metric is doing the max diferent, not the sum of the time.
Now i'll show you the diferent metrics and what i tried.



Anyone know where the problem could come from?

Many thanks in advance for your help,


Joan


 

  • JoanElGran1899 , Try like

    Sumx(addcolumns(summarize( 'Dim Invoice, 'Dim Invoice[Document no], 'Dim Invoice'[Created by]) , "_1", [Date diff invoice minute] )  , [_1] )

2 Replies

  • JoanElGran1899 , Try like

    Sumx(addcolumns(summarize( 'Dim Invoice, 'Dim Invoice[Document no], 'Dim Invoice'[Created by]) , "_1", [Date diff invoice minute] )  , [_1] )

    • JoanElGran1899's avatar
      JoanElGran1899
      Frequent Visitor

      Yess it works! By the way I want to ask you one more question, 
      I need only to sum the time in the same day of the 'Data created'


      For exemple the last line i don't want to sum it.

      Thank you