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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
left4pie2
Helper I
Helper I

Measure Displaying Incorrect Data

I'd like to display the average of a given measurement vs a graph of the average of that measurement over all time.

left4pie2_0-1646241766989.png

I created the measure LengthLast to do this.

left4pie2_1-1646241823486.png

In the last week, Freemon is the only vendor that has data, so there should be an averge for Freemon but not Besse or Great Lakes.

I varified the data and the average it's coming up with for Freemon is correct, but it's also displaying an average for Besse and Great Lakes. What's also wierd is when it does that column average it shows the correct Freemon average and does not factor in the other two.

I made sure to get rid of any null dates incase it was pulling rows without a date but that didn't change anything.

 

I was messing around with a date slider and just a simple table and it display the correct into when the date only includes this last week. As I expand the timeframe it adds in the other vendors, but once they're added in the average for that vendor doesn't change and again doesn't effect the column average.

left4pie2_2-1646242243607.pngleft4pie2_3-1646242267116.pngleft4pie2_4-1646242281667.pngleft4pie2_5-1646242298191.png

Thanks in advance for any help!

 

 

2 REPLIES 2
amitchandak
Super User
Super User

@left4pie2 , got confused. where is the logic for last week? Are you looking for last week data ?

 

Power BI — Week on Week and WTD
https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-La...
https://www.youtube.com/watch?v=pnAesWxYgJ8

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

This is what I'd like it to look like

left4pie2_0-1646314988811.png

 

Here's my measure to accomplish this.

left4pie2_1-1646315115770.png

You can see I create a variable last_w that takes the most recent week from the Start of week column (A column which takes the date of a row and assigns it the date of the last monday of the week).

I then filter the data by checking if the most recent start of week matches the start of week value for the row. 

Again it works in a way. Last week we only had data for Freemon and the average it came up with for freemon is correct, but it's also coming up with values for the two vendors we have no data for.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.