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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
lukas_alex
Frequent Visitor

Averaging data based on a Date range in a visual

I am looking to create a report on mark up data.  To make this report each entry has a start date, an end date, and a markup percentage.  I want to create a visual that shows the average markup month my month and the average markup is computed by averaging all the markups that active for that month (that month is within the date range).  I am thinking to do this I may have to make another table and filter the data 

 

Are there any other ways I may be able to do this?

 

 

I have tried this approach.  Made a new table with all the start of month dates and end of month dates and then wrote an expression to make a new colum using to try to get the average using these two colums but I get an error.  Is there a better expression to use to do this?

 

 

 

Date tableDate tableExpression triedExpression tried

 

7 REPLIES 7
Anonymous
Not applicable

How big is the date range between each entry?

On average 5-6 months

 

Anonymous
Not applicable

So do you want an entry that goes from January to June to be weighted in the average of every month from January to June? 

yes that is what I am looking for

 

Anonymous
Not applicable

I don't think there's another way you could do it without creating another table. 

 

The January-June entry would need to somehow have the value of each month from January-June in one sliceable column but idk how that could be done.

 

But with another table you could easily go:

 

calculate(average[metric],filter([Start Date]<=[Date] && [End Date]>=[Date] 

Would I need to create a table for each month or is there a way to do this in one table with all of the months I need

 

Anonymous
Not applicable

I'm sorry... My solution would just be a measure for one individual month. If there was a way for your data to be broken down into a row for every entry for every month then you could do it easily. But I'm unsure on how that could happen. 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.