Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
JoanElGran1899
Frequent Visitor

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.

JoanElGran1899_0-1637159580019.png
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.

JoanElGran1899_1-1637160683748.png

JoanElGran1899_2-1637160714388.png

JoanElGran1899_3-1637160734190.png

Anyone know where the problem could come from?

Many thanks in advance for your help,


Joan


 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@JoanElGran1899 , Try like

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

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@JoanElGran1899 , Try like

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

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'

JoanElGran1899_0-1637229718055.png
For exemple the last line i don't want to sum it.

Thank you

 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.