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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
Anonymous
Not applicable

Get the Average of a measure

I have data in power bi in this example format:

SKUecap priceasp per corecore count
A1200315
B222732.42
C449957.96

 

 

"Asp per core" is a caluclated column which uses the formula :

ASP per Core = (Table5[Average SKU ECAP ($)] / Table5[Core Count])
and "Average SKU ECAP ($)" is a measure which uses the formula :
Average SKU ECAP ($) = CALCULATE(
AVERAGE(Table5[Ecap Price ($)]),
ALLEXCEPT(Table5,Table5[Processor Number])
)
 
I then made a matrix visualisation like below:
mathewsjoy_0-1672759424998.png

 

I want to make another table visulation like above, but it shows me the core count and the average of average asp per core e.g.:

Taking below porcessors with 10 cores data 

mathewsjoy_1-1672759736361.png
Core CountAverage of Average ASP per core
1060.34

 

And rest table would show average of average asp per core, for all 1 core, 2 core, 3 core processors etc.

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

Please refer to my pbix file to see if it helps you.

Measure2 =
VAR _1 =
    AVERAGEX (
        FILTER (
            ALL ( 'Table' ),
            'Table'[core count] = SELECTEDVALUE ( 'Table'[core count] )
        ),
        'Table'[ECAP]
    ) //var _2=CALCULATE(DISTINCTCOUNT('Table'[SKU]),FILTER(ALL('Table'),'Table'[core count]=SELECTEDVALUE('Table'[core count])))
RETURN
    _1 / MAX ( 'Table'[core count] )

vpollymsft_1-1672882444021.png

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Polly

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

7 REPLIES 7
Anonymous
Not applicable

Hi @Anonymous ,

I have some doubt.

  •  The Processor number are quite different,Why the last three use averages? How can you tell if they are a group? Is the first core count number the same? vpollymsft_0-1672798177399.png

    If so, please have a try.

measure=averagex(filter(all(table),table[first core count]=selectedvalue(table[first core count]),[average asp per core])
  • If not, please provide more details.

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Polly

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

Anonymous
Not applicable

Sorry, iam using last 3 as an example as they are the only three processors with 10 cores, however this table i showed, is showing a summary of the data in a amtrix table, so there will be lots of rows of these 3 skus. I use first core count, as for some reason it doesnt allow just core count, i think because its a summary in the matrix, but just they all have 10 cores, same for e.g. if you take D-2753NT example (the row above) every row in my dataset which uses thatprocessor always has 12 cores etc

Anonymous
Not applicable

Hi @Anonymous ,

If so, please have a try.

measure =
AVERAGEX (
    FILTER (
        ALL ( table ),
        table[first core count] = SELECTEDVALUE ( table[first core count] )
    ),
    [average asp per core]
)

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Polly

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

 

Anonymous
Not applicable

Hey,

 

First Core Count isnt actualy a column, its just when i use my Core Count column, it in the matrix table it maks me choose one of the below 

mathewsjoy_0-1672824351795.png

 

 

Anonymous
Not applicable

Hi @Anonymous ,

Is it a measure? The conditions offered are different each time, and I can't understand what you mean correctly.

Could you please provide more details with your desired output and pbix file without privacy information (or some sample data)  for me to test?

 

Best Regards
Community Support Team _ Polly

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

Anonymous
Not applicable

SKUECAPcore count
A52
B83
A102
C24
C34
D62
D82

 

Above is an example of the raw dataset i feed into powerbi,

the ecap price can be differnet even if it is the same processor (but not by much), the core count however will always remain the same for the same processor, but 2 differnt processors can have the same core count.

 

I need to achieve 2 things:

1. Create a matrix table visulation that displays all the distinct processors, and then shows the average ecap of each processor divided by its core count, e.g. in above example average of processor A would be average of 5 and 10 so 7.5, then divided by its core count of 2.

 

2. I want another matrix table that shows all the differnt distinct core counts, e.g. in above ddataset example 2,3 and 4, as row values and then next to it shows the average of the average ecap core count (which is the value we calculated in (1) the above requested).

E.g. in the above table dataset for core count 2 the matrix would look like so

Core count | Average of average ecap core count

        2         |     3.625

 

Anonymous
Not applicable

Hi @Anonymous ,

Please refer to my pbix file to see if it helps you.

Measure2 =
VAR _1 =
    AVERAGEX (
        FILTER (
            ALL ( 'Table' ),
            'Table'[core count] = SELECTEDVALUE ( 'Table'[core count] )
        ),
        'Table'[ECAP]
    ) //var _2=CALCULATE(DISTINCTCOUNT('Table'[SKU]),FILTER(ALL('Table'),'Table'[core count]=SELECTEDVALUE('Table'[core count])))
RETURN
    _1 / MAX ( 'Table'[core count] )

vpollymsft_1-1672882444021.png

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Polly

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

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors
Top Kudoed Authors