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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Calculate the total average days

Hello community!

 

I am stumped. So I am trying to do a "conversion" rate based on a start date from one table and a start date from another table. These two tables do not have a direct relationship, however, they are both connected to a main table through an ID. The main table includes the slicer # and the main table ID #. I am using a DAX where I pull the minimum date value based on the start date of each table, then I am using a datediff between those two minimum values.

 

What I need is for the sum of those conversion days for all of the main table #s and then I will divide that number by the count of main table IDs. 

 

Here's an example. Instead of it showing -254 I need it to total eveything in that table in order for me to divide it by the count. Hopefully this wasn't too confusing, Thanks!

 

dakpc_0-1681477826236.png

 

                    

 

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @Anonymous 

please try

Conversation Date (days/ID) =
AVERAGEX (
VALUES ( 'Main Table'[Main Table ID] ),
CALCULATE (
DATEDIFF ( MIN ( Table1[StartDate] ), MIN ( Table2[StartDate] ), DAY )
)
)

View solution in original post

2 REPLIES 2
tamerj1
Super User
Super User

Hi @Anonymous 

please try

Conversation Date (days/ID) =
AVERAGEX (
VALUES ( 'Main Table'[Main Table ID] ),
CALCULATE (
DATEDIFF ( MIN ( Table1[StartDate] ), MIN ( Table2[StartDate] ), DAY )
)
)

Anonymous
Not applicable

Wow I was overthinking this, LOL! Works perfectly. Thank you!

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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