Reply
Sal922
New Member

How to work out average for two cycles

Hello, seek for help!

Sample data for two cycles (Jan to June and July to Dec):

 

comp A, jan to jun, proj L, score 80, rating 1

comp B, jan to jun, proj L, score 70, rating 2

comp A, jul to dec, proj L, score 70, rating 2

comp B, jul to dec, proj L, score 84, rating 1

comp A, jan to jun, proj K, score 65, rating 3

comp A, jul to dec, proj K, score 50, rating 4

comp C, jan to jun, proj K, score 45, rating 5

comp C, jul to dec, proj K, score 55, rating 4

 

Q1: Average score of respective companies.

 

Q2: Average rating of respective companies regardless of project names. comp C be shown when press rating 5 at slicer. A will be under rating 3 (average of 80+70+65+50=65). comp B will be shown under rating 2. results i got - comp A shown under rating 1,2,3,4

 

Q3: Number of projects under respective companies

 

 

1 REPLY 1
avatar user
Anonymous
Not applicable

Hi  @Sal922 ,

The sentence after the second condition is not very clear, whether you can express the desired result you want in the form of pictures, we can better help you

Here are the steps you can follow:

1. Create measure.

Average score of respective companies =
AVERAGEX(
    FILTER(ALL('Table'),
    'Table'[Com]=MAX('Table'[Com])),[Score])
Average Rating =
AVERAGEX(
    FILTER(ALL('Table'),
    'Table'[Com]=MAX('Table'[Com])),[rating])
Number of projects under respective companies =
CALCULATE(
    DISTINCTCOUNT('Table'[proj]),
      FILTER(ALL('Table'),
    'Table'[Com]=MAX('Table'[Com])))

2. Result:

vyangliumsft_0-1685349210016.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

avatar user

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)