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

Preparing for a certification exam? Ask exam experts all your questions on May 15th. Register now.

Reply
Anonymous
Not applicable

Measurement SUM

Hello all, 

 

I think it is an easy one. But I really can't help myself. 

 

At the moment I am creating a measurement which is meant to be the sum of two different fields this way: 

 

BP in € = average(Worksheet[Price per Item])*average(Plan[Business Plan]) - I do not know why I chose "average" in the past. But for the table it worked so far. 
 
But now the total at the end ist not right. It should be the sum of the whole column. The figures in the column itself is right (it is always price*Business Plan) 
 
Do you know how to solve this problem? 
GabbyGla_1-1651672851867.png

 

Thank you all in advance! 

 

 
Best
Gabby 
 
1 ACCEPTED SOLUTION
v-luwang-msft
Community Support
Community Support

Hi @Anonymous ,

According to the picture you provided, there is a spelling error in your dax in the picture, HASONEVALUE, which you entered as HASONVALUE, missing an "e".

vluwangmsft_0-1652254022963.png

Did I answer your question? Mark my post as a solution!


Best Regards

Lucien

View solution in original post

9 REPLIES 9
v-luwang-msft
Community Support
Community Support

Hi @Anonymous ,

Has your problem been solved, if so, please consider Accept a correct reply as the solution or share your own solution to help others find it.

Best Regards
Lucien

v-luwang-msft
Community Support
Community Support

Hi @Anonymous ,

According to the picture you provided, there is a spelling error in your dax in the picture, HASONEVALUE, which you entered as HASONVALUE, missing an "e".

vluwangmsft_0-1652254022963.png

Did I answer your question? Mark my post as a solution!


Best Regards

Lucien

VahidDM
Super User
Super User

Hi @Anonymous 

 

The total issue is very popular, Please check this link then you can find this issue and how to deal with that in detail:

https://www.vahiddm.com/post/why-my-measure-returns-the-wrong-total

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 

Anonymous
Not applicable

Hello @VahidDM 

 

the post really sums up my problem! Thanks for that. 

 

EDIT: I do not know how to use this 

 

AVERAGE Revenue = IF ( HASONEVALUE ( 'Table'[Store] ), AVERAGE ( 'Table'[Revenue] ), SUMX ( SUMMARIZE ( 'Table', 'Table'[Store], "AVERAGEC", AVERAGE ( 'Table'[Revenue] ) ), [AVERAGEC] ) )

 

in the case of my formula BP in € = average(Worksheet[Price per Item])*average(Plan[Business Plan]) 

 

________________________________________________________________________________________________________________

Now I have tried to enter the formular for the measurement, but the formulare wont accept the first part. Could you take a look at it? It think the part after hasonvalue seems wrong. 

 

GabbyGla_0-1651733712520.png

 

"Price per item" has a sum symbol, do not know if this is the reason why i cant enter it in the formula? 😞 

GabbyGla_1-1651733788788.png

 

PC2790
Community Champion
Community Champion

As your formula is to calculate the average that' why the total is taking average of the column values.

The figures in the columns are fine because the calculation is happening on row by row basis.

Instead try this:

BP in € = SUMX(Worksheet,Worksheet[Price per Item]*Plan[Business Plan]

Anonymous
Not applicable

Hello, 

 

thank you for your post! That is what I am thinking of - but why do Power BI Desktop do not accept the last part of the formula. It seems that it is not possible to include the Business Plan part in this measurement? 

GabbyGla_0-1651731955646.png

 

PC2790
Community Champion
Community Champion

If there is a relation between Plan and Worksheet, try using RELATED Dax.

something like:

BP in € = SUMX(Worksheet,Worksheet[Price per Item]*RELATED(Plan[Business Plan]))

 
jsaunders_zero9
Responsive Resident
Responsive Resident

Check that you don't have Averages turned on

jsaunders_zero9_0-1651731373036.png

 

Anonymous
Not applicable

Thank you for your message. I do not even have the option to choose from those fields. Do you know the reason why? Is it because of measurement? BP in € = average(Worksheet[Price per Item])*average(Plan[Business Plan]

GabbyGla_0-1651731596861.png

 

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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