Forum Discussion
Using Meausre in another measure not working
Hope someone can help me on this. I am attempting to use a measure to calculate another measure. I know this works based on tutorials. However, I am geting the error "The AVERAGE function only accepts a column reference as the argument number 1." I am using PowerBI desktop version: Version: 2.105.961.0 64-bit (May 2022).
Does anyone know if the ability to use a measure to build another measure was introduced in a newer version of Power BI desktop?
Thanks
- Anonymous2 years ago
Hi Anonymous ,
According to your statement, I think your issue should be caused that you add a measure into AVERAGE() function.
As the error tells you, AVERAGE() function only support us to add a column instead of a measure.
If you want to calculate average based on a measure, I suggest you to try AVERAGEX() function.
JustAverage = AVERAGEX('TableName',[Summary_Total])For reference: AVERAGEX
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
5 Replies
- tamerj1
Community Champion
Hi Anonymous
To sum a measure you can use SUMX however, you need to identify the table to iterate over. This table is dependent on the visual and/or the required granularity of calculation.
please provide a little more context - AnonymousNot applicable
Thank you. Here is the project. I have measures created already but when I attempt to create a new measure, I am not seeing those measures available (see below)
When I do attempt to use a measure "Summary_Total", I am getting an error that the function will only allow a column referernce. I know from tutorials that I should be allowed to reference an existing measure to build a new measure. I am wondering if this is an issue with the version of PowerBI desktop that I am using.
- AnonymousNot applicable
Hi Anonymous ,
According to your statement, I think your issue should be caused that you add a measure into AVERAGE() function.
As the error tells you, AVERAGE() function only support us to add a column instead of a measure.
If you want to calculate average based on a measure, I suggest you to try AVERAGEX() function.
JustAverage = AVERAGEX('TableName',[Summary_Total])For reference: AVERAGEX
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- AnonymousNot applicable
Rico,
Thank you. That worked. Truly appreciate it.
- tamerj1
Community Champion
Anonymous
What columns are you placing the stacked area chart and from which table(s)? What average are you looking for? Please provide an example.