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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Relative date slicer not aggregating properly

Hello all,

I've created a graph with average cost. It uses the following measure. [Costs] is another measure.

 

 Average Cost per Handling =

Var _Handlings = MAX(CALCULATE(COUNT(Table1[Seq]),Table1[HandlingType]="Paid",Table1[Location]="US"),1)

Return

[Costs] / _Handlings 

 

 

I want to show the past few weeks in a graph, but somehow it has a spike in the first week which messis up the visual.

As you can see, 2019 week 50 has a really high average cost (it doesn't matter which week, it's always the first one in the visual that's high as shown).

 

  image.png

 

When I change the relative filter to days instead of calendar weeks, the data show correctly.

 image.png

What am I missing here?

 

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I figured it out by looking at which dates it displays when I zoom in on that last week. Because PowerBI's weeks start on Sunday, but my weeks (in my datetable) start on Monday, it shows only the Sunday of that first week. There are always very few handlings done on Sunday, if at all, but my costs are based on a per-day-basis due to maintenance and depreciation costs. That's why the average cost is so high.

View solution in original post

1 REPLY 1
Anonymous
Not applicable

I figured it out by looking at which dates it displays when I zoom in on that last week. Because PowerBI's weeks start on Sunday, but my weeks (in my datetable) start on Monday, it shows only the Sunday of that first week. There are always very few handlings done on Sunday, if at all, but my costs are based on a per-day-basis due to maintenance and depreciation costs. That's why the average cost is so high.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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