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
matthewL
New Member

Average of a measure

Hi everyone.

 

I'm trying to calculate the average value of the CORRECT_STOCK for all the items I've got in my DB. The problem is that I find it difficult to calculate the average of a measure, without having a column or table.

 

I made two attempts to calculate it, but as you can see the values are not correct (in the first case I get the last value of CORRECT_STOCK for the item, while in the second I get a too low value.

 

Warehouse.pbix 

 

Can you help me? Thank you in advance.

1 ACCEPTED SOLUTION

@matthewL 

 

If you open the workspace that i have attached on the message you will notice that the first field comes from MSTR_ITM table and not FACT_MOVE table.

 

It seems that these 2 tables are not connected properly in the data model.

 

Also in the filter page the page filter comes MSTR_ITM table and not FACT_MOVE table

View solution in original post

3 REPLIES 3
themistoklis
Community Champion
Community Champion

@matthewL 

 

This measure works for me:

Average New = AVERAGEX(VALUES('Calendario RIDOTTO'[Date]),[CORRECT_STK])

 

See attached workspace.

 

 

Sorry but the value is the same for all items (283.85), or am I wrong? However thanks for the help.same.png

@matthewL 

 

If you open the workspace that i have attached on the message you will notice that the first field comes from MSTR_ITM table and not FACT_MOVE table.

 

It seems that these 2 tables are not connected properly in the data model.

 

Also in the filter page the page filter comes MSTR_ITM table and not FACT_MOVE table

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.

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