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
Anonymous
Not applicable

Three Months (Quarterly) Market Share Average

Hello Community,

 

I have amounts per month and I want  to createa line chart in which I want to show the Three Months (Quarterly) Market Share Average. My data looks like the below table and the outcome I want to create is the yellow column shown below (Sum 3 months in Amount divided by the sum of three months of the Total amounts)

MariosChr90_0-1605269276290.png

 

Thank you

1 ACCEPTED SOLUTION
v-stephen-msft
Community Support
Community Support

Hi @Anonymous ,

 

Sorry for my late reply.

 

If you have a date column in your original table. Please kindly refer to:

 

https://community.powerbi.com/t5/Desktop/Calculate-an-average-for-last-3-months/td-p/159154

 

https://community.powerbi.com/t5/Desktop/dynamically-calculate-average-for-last-3-months-sales-and-last-6/td-p/121846

 

https://community.powerbi.com/t5/Desktop/Average-of-3-Months/td-p/421686

 

If not, create a calculated column.

 

Category =
SWITCH (
    [Month],
    "January", 1,
    "February", 1,
    "March", 1,
    "April", 2,
    "May", 2,
    "June", 2,
    "July", 3,
    "Augest", 3,
    "September", 3,
    "October", 4,
    "November", 4,
    "December", 4
)

 

11.png

 

Then create a measure.

 

3 Months Average Quarter Market Share =
CALCULATE (
    AVERAGE ( 'Table'[Monthly Market Share] ),
    FILTER ( ALL ( 'Table' ), [Category] = MAX ( 'Table'[Category] ) )
)

 

12.png

 

 

 

You can check the details of the second situation from here.

 

 

 

Best Regards,

Stephen Tao

 

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-stephen-msft
Community Support
Community Support

Hi @Anonymous ,

Could you tell me if your problem has been solved?
If it is, kindly Accept it as the solution. More people will benefit from it.
Or you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file from your Onedrive for Business.


Best Regards,
Stephen Tao

v-stephen-msft
Community Support
Community Support

Hi @Anonymous ,

 

Sorry for my late reply.

 

If you have a date column in your original table. Please kindly refer to:

 

https://community.powerbi.com/t5/Desktop/Calculate-an-average-for-last-3-months/td-p/159154

 

https://community.powerbi.com/t5/Desktop/dynamically-calculate-average-for-last-3-months-sales-and-last-6/td-p/121846

 

https://community.powerbi.com/t5/Desktop/Average-of-3-Months/td-p/421686

 

If not, create a calculated column.

 

Category =
SWITCH (
    [Month],
    "January", 1,
    "February", 1,
    "March", 1,
    "April", 2,
    "May", 2,
    "June", 2,
    "July", 3,
    "Augest", 3,
    "September", 3,
    "October", 4,
    "November", 4,
    "December", 4
)

 

11.png

 

Then create a measure.

 

3 Months Average Quarter Market Share =
CALCULATE (
    AVERAGE ( 'Table'[Monthly Market Share] ),
    FILTER ( ALL ( 'Table' ), [Category] = MAX ( 'Table'[Category] ) )
)

 

12.png

 

 

 

You can check the details of the second situation from here.

 

 

 

Best Regards,

Stephen Tao

 

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.