Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
I'd like to display the average of a given measurement vs a graph of the average of that measurement over all time.
I created the measure LengthLast to do this.
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.
Thanks in advance for any help!
@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
This is what I'd like it to look like
Here's my measure to accomplish this.
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.
| User | Count |
|---|---|
| 58 | |
| 45 | |
| 31 | |
| 17 | |
| 16 |
| User | Count |
|---|---|
| 75 | |
| 65 | |
| 46 | |
| 23 | |
| 22 |