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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
MartynasBI
Frequent Visitor

adding an average measure to a chart with existing column variables

Hi,

 

I have the following area chart visual, which contains a legend of two variables (CLO A and CLO B).

MartynasBI_0-1691088031116.png

 

I would like to calculate the average value of the CLO A and CLO B, and add that average to the area chart as the "average CLO" - which would be a third area line in the chart.

 

Here is the data used

MartynasBI_1-1691088050584.png

MartynasBI_2-1691088081302.png

 

Many thanks in advance

 

 

1 ACCEPTED SOLUTION

Hi, @MartynasBI 

 

You can try the following methods.

Column:

Average = AVERAGEX(FILTER('Table',[Revenue growth]=EARLIER('Table'[Revenue growth])),[Nr of companies])

vzhangti_0-1691739493217.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

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
kpost
Super User
Super User

Does this work?

AVERAGE_BY_REVENUE% =
CALCULATE(

       AVERAGEX(
              VALUES(Table[Revenue Growth']),
              COALESCE(SUM(Table['Nr of companies']), 0)
                        )
ALL(Table[CLO Name])
)

//Mediocre Power BI Advice, but it's free//
kpost
Super User
Super User

Does this work?  (The paren

AVERAGE_BY_REVENUE% =
CALCULATE(

       AVERAGEX(
              VALUES(Table[Revenue Growth']),
              COALESCE(SUM(Table['Nr of companies']), 0)
                        )
ALL(Table[CLO Name])
)

//Mediocre Power BI Advice, but it's free//

Hi @kpost 

 

Unfortunately it did not work

MartynasBI_0-1691578409966.png

 

Hi, @MartynasBI 

 

You can try the following methods.

Column:

Average = AVERAGEX(FILTER('Table',[Revenue growth]=EARLIER('Table'[Revenue growth])),[Nr of companies])

vzhangti_0-1691739493217.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

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

 

Hi @v-zhangti ,

 

Yes, the numbers are correct, thanks!

 

However, I Power BI does not allow me to add this newly created column to the area chart visual Y axis. Do you know any workarounds around that?

 

Thanks,

It would be a measure, not a column.

Unfortunately a measure in this case is not sufficient, as it cannot be added to the visual

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.