The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi Folks - I'd appreciate some help tackling this issue. Basically, I'd like to "fix" a measure based upon the result of a different measure, corresponding to the latest date in the date column (which would be today since this is refreshed daily).
I've tried a myriad of approaches, including lastdate(date), max(date), today(), but none have worked. I was able to fix it on the most recent date (see below), but this is not dynamic and will change when the data is refreshed.
Date | Count | 10 week rolling avg | 10 week mean |
3/4/2019 | 60 | 8.8 | 68.1 |
3/11/2019 | 79 | 14.8 | 68.1 |
3/18/2019 | 53 | 22.7 | 68.1 |
3/25/2019 | 66 | 28 | 68.1 |
4/1/2019 | 80 | 34.6 | 68.1 |
4/8/2019 | 83 | 42.6 | 68.1 |
4/15/2019 | 52 | 50.9 | 68.1 |
4/22/2019 | 68 | 56.1 | 68.1 |
4/29/2019 | 64 | 62.9 | 68.1 |
5/6/2019 | 76 | 65.3 | 68.1 |
5/13/2019 | 77 | 68.1 | 68.1 |
Any help would be much appreciated!
@niko18033 try this measure
10 Week Mean1 = VAR __mostRecentDate = CALCULATE( MAX( Table3[Date] ), ALL( Table3[Date] ) ) RETURN CALCULATE( [10 week rolling avg],Table3[Date] = __mostRecentDate )
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
User | Count |
---|---|
14 | |
11 | |
8 | |
6 | |
5 |
User | Count |
---|---|
29 | |
19 | |
13 | |
8 | |
5 |