cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
PowerBiNoob
Frequent Visitor

Avg on different values in same column

Hey,

 

I have a Table which contains the following columns, I would like to get the average of the "SampleValue" for each of the "WhatWeek"  - example (avg 22.6 for Last Week , avg 134.5 for Current Week) ? Regards

 

SampleValueTimeSampledWhatWeek
37.2402343813/07/2017Last  Week
7.13085937513/07/2017Last  Week
50.1259765613/07/2017Last  Week
20.2041015613/07/2017Last  Week
17.398437513/07/2017Last  Week
3.62207031313/07/2017Last  Week
5.8632812518/07/2017Current Week
311.057617218/07/2017Current Week
281.651367218/07/2017Current Week
52.5800781318/07/2017Current Week
63.4306640618/07/2017Current Week
7.90722656318/07/2017Current Week
219.142578118/07/2017Current Week
1 ACCEPTED SOLUTION

Hi @PowerBiNoob

 

To do what you want, just create some calculated measures.  You can start with a pretty easy measure like :

 

Average of SampleValue = AVERAGE('Table1'[SampleValue])

And then drag this to your visual.  You can then create additional measures for your previous week, and difference metrics


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

View solution in original post

3 REPLIES 3
Phil_Seamark
Microsoft
Microsoft

Hi @PowerBiNoob

 

If you drag your 'WhatWeek' to the report canvas and change your visual to be Table or Matrix.  Then drag the SampleValue column to the same visual, the default behaviour will be SUM.  Then click on the SampleValue field in the values area and change the default aggregation to Average.  This will work the same for other visuals.

 

WhatWeek.jpg


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Thanks for the response , I need to use the values in a  KPI visual to get the avg diff between current and last week, but doing what you suggest works fine for table display...thank you again

Hi @PowerBiNoob

 

To do what you want, just create some calculated measures.  You can start with a pretty easy measure like :

 

Average of SampleValue = AVERAGE('Table1'[SampleValue])

And then drag this to your visual.  You can then create additional measures for your previous week, and difference metrics


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors