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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
HI All....
How to get Quarter wise weekly average for past 5 quarters
Example : If current quarter is Q3 2024, data should be displayed for Q3 2024, Q2 2024, Q1 2024, Q4 2022, Q3 2023.
like below table i have to show the weekly avgs.
Hi @Chari ,
First create a date table:
DateTable =
ADDCOLUMNS (
CALENDAR (DATE(2023, 1, 1), DATE(2024, 12, 31)),
"Year", YEAR([Date]),
"Quarter", "Q" & FORMAT(QUARTER([Date]), "0"),
"YearQuarter", FORMAT([Date], "YYYY") & "Q" & FORMAT(QUARTER([Date]), "0"),
)
Create a measure to filter the data for the last 5 quarters:
Last5Quarters =
CALCULATE (
[YourWeeklyAverage],
FILTER (
ALL('DateTable'),
'DateTable'[YearQuarter] IN {
FORMAT(EDATE(TODAY(), -3 * 0), "YYYY") & "Q" & FORMAT(QUARTER(TODAY()), "0"),
FORMAT(EDATE(TODAY(), -3 * 1), "YYYY") & "Q" & FORMAT(QUARTER(EDATE(TODAY(), -3 * 1)), "0"),
FORMAT(EDATE(TODAY(), -3 * 2), "YYYY") & "Q" & FORMAT(QUARTER(EDATE(TODAY(), -3 * 2)), "0"),
FORMAT(EDATE(TODAY(), -3 * 3), "YYYY") & "Q" & FORMAT(QUARTER(EDATE(TODAY(), -3 * 3)), "0"),
FORMAT(EDATE(TODAY(), -3 * 4), "YYYY") & "Q" & FORMAT(QUARTER(EDATE(TODAY(), -3 * 4)), "0")
}
)
)
Hope it helps!
Best regards,
Community Support Team_ Scott Chang
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Chari
you can write a column as follows:
If this post helps, then I would appreciate a thumbs up 👍 and mark it as the solution to help the other members find it more quickly.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 11 | |
| 9 | |
| 9 | |
| 6 | |
| 5 |
| User | Count |
|---|---|
| 27 | |
| 22 | |
| 19 | |
| 17 | |
| 11 |