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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

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] )

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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] )

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.