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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
CelineWe
New Member

calculated column to measure

Hi

I have a table and calculated column in power bi desktop looking like this: 

CelineWe_0-1742999150507.png

calculation = CALCULATE(
    AVERAGE(Table[value]),
    ALLEXCEPT(Table,Table[category])
)
 
My intention is to make a line and stack column visual with name on x-axis, sum of value on column y-axis and calculation on line y-axis. Is it possible to use a measure for calculation instead of calculated column?
This is the visual I want to make:
CelineWe_1-1742999410249.png

 

Thank you in advance!

1 ACCEPTED SOLUTION
v-pagayam-msft
Community Support
Community Support

Hi @CelineWe ,
Thank you @pankajnamekar25 for the helpfu response!

Yes, you can achieve this using a measure instead of a calculated column. The measure will dynamically calculate the average value per category and adjust based on any filters applied in your report.
Please use the below DAX :

CalculationMeasure =
CALCULATE(
    AVERAGE('Table'[Value]),
    ALLEXCEPT('Table', 'Table'[Category]),
    VALUES('Table'[Category])
)

Attaching the pbix and the screenshot for your reference.
vpagayammsft_0-1743060853066.png

I hope this helps.If so,kindly accept it as a solution.

Thank you for being a valued member of the Microsoft Fabric Community Forum!


View solution in original post

3 REPLIES 3
v-pagayam-msft
Community Support
Community Support

Hi @CelineWe ,
Thank you @pankajnamekar25 for the helpfu response!

Yes, you can achieve this using a measure instead of a calculated column. The measure will dynamically calculate the average value per category and adjust based on any filters applied in your report.
Please use the below DAX :

CalculationMeasure =
CALCULATE(
    AVERAGE('Table'[Value]),
    ALLEXCEPT('Table', 'Table'[Category]),
    VALUES('Table'[Category])
)

Attaching the pbix and the screenshot for your reference.
vpagayammsft_0-1743060853066.png

I hope this helps.If so,kindly accept it as a solution.

Thank you for being a valued member of the Microsoft Fabric Community Forum!


pankajnamekar25
Memorable Member
Memorable Member

Hello @CelineWe ,

 

You can try 

CalculationMeasure =
CALCULATE(
AVERAGE(Table[value]),
ALLEXCEPT(Table, Table[category])
)

same as measure it will work.

 

Thanks,
Pankaj

If this solution helps, please accept it and give a kudos (Like), it would be greatly appreciated.

if I try the same for measure then my visual looks like this:

CelineWe_0-1743002612760.png

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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