Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
siwyan_1
Regular Visitor

Average quarterly data by month

Hi,

 

I been asking around for hlep on this issue in the past fews days but couldn't get a solution. 

 

Below is the powerbi pbix file download link. 

https://fere.me/yaup/jbiqwq/

 

I have two sales data tables as below. 

Powerbi.PNG

I would like to average the quarterly Data by monty (right table, on MonthId 201510, sale data 2161650/3=720550), and add this number to left table accordingly.

Final look should be something like:

 

MonthId          TotalSales

201510            1287000(566450+720550)

201511            1523640(803090+720550)

201512            1597530(876980+720550)

 

So far I tried 

Avg by Q = CALCULATE(sum('Retail_Quarter'[USD Net Rev])/3,ALL('CalendarMonthYear'[MonthBeginDate]))

but this only fill in the averaged quarter data into the first month of each quarter as below.

Power BI2.PNG

 

 

1 ACCEPTED SOLUTION
v-jiascu-msft
Employee
Employee

Hi @siwyan_1,

 

Based on your mode, there are many months have no values. This could be the cause. So we need to provide proper context in the visuals. Maybe you can do it like this, adding [Year] and [Quarter].

Avg by Q 2 =
CALCULATE (
    AVERAGEX (
        SUMMARIZE ( Quarter, FiscalYMD[Quarter], "TOTAL", SUM ( Quarter[USD Net Rev] ) ),
        [TOTAL] / 3
    ),
    ALLEXCEPT ( FiscalYMD, FiscalYMD[Year], FiscalYMD[Quarter] )
)

Average_quarterly_data_by_month

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-jiascu-msft
Employee
Employee

Hi @siwyan_1,

 

Can you mark the proper answer as a solution please?

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-jiascu-msft
Employee
Employee

Hi @siwyan_1,

 

Based on your mode, there are many months have no values. This could be the cause. So we need to provide proper context in the visuals. Maybe you can do it like this, adding [Year] and [Quarter].

Avg by Q 2 =
CALCULATE (
    AVERAGEX (
        SUMMARIZE ( Quarter, FiscalYMD[Quarter], "TOTAL", SUM ( Quarter[USD Net Rev] ) ),
        [TOTAL] / 3
    ),
    ALLEXCEPT ( FiscalYMD, FiscalYMD[Year], FiscalYMD[Quarter] )
)

Average_quarterly_data_by_month

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.