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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
OliHns
New Member

How to get value for every date from dataset with wide range of dates.

Hi,

 

So I've got a dataset that has emails sent over various date ranges for every member of staff. (An export from MS Admin centre.) The dataset looks like with StartDate and Emails/Day as calculated columns.

 

UserEmails SentDatePeriodStartDateEmails/Day
A10021/10/21714/10/2114.3
B15021/10/21714/10/2121.4
C12021/10/21714/10/2117.1
A30021/10/213021/09/2110
B40021/10/213021/09/2113.3
C35021/10/213021/09/2111.7
A8015/10/21708/10/2111.4
B5015/10/21708/10/217.1
C12015/10/21708/10/2117.1

 

I then also have two referenece tables, a full Staff List with simply users A, B, C etc. their associated departments/regions, and a Dates table with 01/01/21, 02/01/21, etc. and the correlated week, month, year those dates fit.

 

So the question is how do I write a measure to tell me the estimated/calculated number of emails sent on a day/week/month by a User/Department/Region?

 

I've been trying to write a Measure attached to the Dates table something like = CALCULATE(AVERAGE(Emails[Sent/Day]),Dates[Date]>=Emails[StartDate],Dates[Date]<=Emails[Date]) but I can't seem to do this more than or less than filter. I assume I need to put in a relationship between the Emails and Dates tables somewhere but I can't work out if it should reference off of the Date or StartDate column.

 

Any advice/help would be much appreciated!

 

Thanks.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@OliHns , refer the file or the blog can help

 

or can date diff help ?

 

How to divide/distribute values between start date or end date or count days across months/days: https://community.powerbi.com/t5/Community-Blog/How-to-divide-distribute-values-between-start-date-o...

 

 

Share with Power BI Enthusiasts: 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

1 REPLY 1
amitchandak
Super User
Super User

@OliHns , refer the file or the blog can help

 

or can date diff help ?

 

How to divide/distribute values between start date or end date or count days across months/days: https://community.powerbi.com/t5/Community-Blog/How-to-divide-distribute-values-between-start-date-o...

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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