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
jonp
Regular Visitor

3 Month Average of Market Share %, Line Chart

Hello, I’m trying to create a line chart that tracks a 3-month rolling average of a percentage over time. I can create a line chart that tracks the count of sales over time, below, but I need to track this as percentage comparison for each month, and a 3-month rolling average of that percentage.

 

IMAGE 1.png

This is the example of the data…

 

IMAGE 2.png

 

Essentially, it needs to be like the chart below (tracking the percentage market share over time), but a line chart, and a 3 month rolling average for each month...

 

IMAGE 3.png

Thanks

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

Assume you already have count formula

 

formula 1
Count1 = Count('Company'[Count])

formula 2
Avg Amount = 
calculate(AverageX(
    VALUES(Table[Date])  // count till Day level
    , [Count1]
),DATESINPERIOD('Date'[Date Filer],ENDOFMONTH(Sales[Sales Date]),-3,MONTH))

 

Values will group data at that level. Like here at day level.

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks.

My Recent Blog - https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

Assume you already have count formula

 

formula 1
Count1 = Count('Company'[Count])

formula 2
Avg Amount = 
calculate(AverageX(
    VALUES(Table[Date])  // count till Day level
    , [Count1]
),DATESINPERIOD('Date'[Date Filer],ENDOFMONTH(Sales[Sales Date]),-3,MONTH))

 

Values will group data at that level. Like here at day level.

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks.

My Recent Blog - https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601

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.