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 August 31st. Request your voucher.
Assume y/e is Jun and current reporting or filter date is Oct-23. How do I calculate the simple average of a balance at at Oct-23 and as at Jun-23. I only have month-end values in table. Needs to be dianamic, i.e. if I filter on Sep-23, average to change to values as at Sep-24 and Jun-23 devided by 2.
Identify Year-End: Dynamically calculate the closest June date before or equal to the selected month (e.g., jun-23 for oct-23).
Fetch Balances: Get the balance for the selected month (e.g., oct 23) and the most recent year-end (e.g., jun 23).
Calculate Average: Add the two balances and divide by 2.
User | Count |
---|---|
26 | |
12 | |
8 | |
7 | |
5 |
User | Count |
---|---|
28 | |
13 | |
12 | |
12 | |
6 |