Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hello all,
I have a scenario where I have 3 tables – 1 fact( named Actual) and 2 dimensions( Calendar and Account Dim). These are connected via Account ID and Date ID.
I have a required to create 2 measure :
I want to get below table values. I am unable to get these. Can someone please suggest on what DAX needs to be changed?
Total 3 months moving Avg for Account Cat | Value | Value on Hand | |
Apple | 1800 | 300 | 0.166666667 |
Boy | 1800 | 400 | 0.222222222 |
Cat | 1800 | 600 | 0.333333333 |
Sample data for Actual is :
Date ID | Account ID | Value | 3Mnths Moving Avg |
1 | A | 100 | 500 |
1 | A | 200 | 600 |
1 | B | 300 | 700 |
1 | B | 100 | 500 |
1 | C | 100 | 600 |
1 | C | 200 | 700 |
1 | C | 300 | 500 |
Sample data for Account Dim:
Account ID | Account Desc |
A | Apple |
B | Boy |
C | Cat |
Thanks,
Lakshay
Try something like this
CALCULATE ( AVERAGEX ( VALUES ( 'Date'[YearMonth] ), [Sales] ), DATESINPERIOD ( 'Date'[Date], MAX ( 'Date'[Date] ), -3, MONTH ) )
Thanks,
Ankit
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
12 | |
11 | |
10 | |
9 | |
8 |