Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello All,
I have calculate Beginning of Period using the below dax
BOH Inv Revenue=
VAR FirstDateForPeriod = FIRSTDATE('tbl_inventory'[Inv_date])
RETURN CALCULATE(SUM('tbl__inventory'[Inv_revenue]),'fiscal_calendar'[f_date]= FirstDateForPeriod)
the calculation should be different for Average of Quarter/Season/Year
For Quarter 1:
feb BOH Inv Revenue + March BOH Inv Revenue + April BOH Inv Revenue/3
For Season 1
feb BOH Inv Revenue + March BOH Inv Revenue + April BOH Inv Revenue+ May + Jun +July +Aug /7
similar for year
my present calculation is below but it just taking Feb(which start of fiscal calendar) revenue and dividing it by months,
what i am looking is take each month value and divide by months based on period.
BOH Inv Avg = [BOH Inv Revenue]/DISTINCTCOUNT(fiscal_calendar[bi_month])
Thanks in Advance.
Hi @prasy14
Here are some posts for your reference.
https://community.powerbi.com/t5/Desktop/Moving-Average/td-p/43041
https://www.sqlbi.com/articles/rolling-12-months-average-in-dax/
Regards,
Cherie
Hello @Cherie,
Thanks for links. In my scenario it is fiscal calendar and every year start in feb (either on 2nd or 3rd or 4th). I can use sameperiodlastyear or DateInPeriod Founction
How can i replicate Sales12M without using Sameperiodlastyear function
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
97 | |
86 | |
70 | |
62 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |