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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
admin11
Memorable Member
Memorable Member

How to modify my expression , so that it can plot average yearly expense ?

Hi All

I have below chart , which is display accumulated expense by year :-

X Axis :-

Year_sort


Y Axis :-

AMOUNT_EXP_ =
CALCULATE(
SUM(GL[AMT])*1,
FILTER(
GL,
GL[1_EXP]="EXP"
)
)
 
i get below chart :-
admin11_0-1654558376086.png

My question is how to modify the expression , so that it will return average yearly expense ?

 

Paul

2 ACCEPTED SOLUTIONS
VahidDM
Super User
Super User

Hi @admin11 


Can you share a sample of you data in a text format,

BTW, Try this on the same chart:

AMOUNT_EXP_ =
CALCULATE ( AVERAGE( GL[AMT] ) * 1, FILTER ( GL, GL[1_EXP] = "EXP" ) )

 

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/

 

 

View solution in original post

Ashish_Mathur
Super User
Super User

Hi,

You can simplify your measure to this

 

AMOUNT_EXP_ = CALCULATE(SUM(GL[AMT]),GL[1_EXP]="EXP")

 

Please show the expected result in a simple table format and share the download link of your PBI file. 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

7 REPLIES 7
Ashish_Mathur
Super User
Super User

Hi,

You can simplify your measure to this

 

AMOUNT_EXP_ = CALCULATE(SUM(GL[AMT]),GL[1_EXP]="EXP")

 

Please show the expected result in a simple table format and share the download link of your PBI file. 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

@Ashish_Mathur it work fine , thank

@Ashish_Mathur 

admin11_0-1654560447678.png

Thank you for sharing , i get error

You are welcome.  The closing bracket of the SUM function as missing.  I have corrected my post.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
VahidDM
Super User
Super User

Hi @admin11 


Can you share a sample of you data in a text format,

BTW, Try this on the same chart:

AMOUNT_EXP_ =
CALCULATE ( AVERAGE( GL[AMT] ) * 1, FILTER ( GL, GL[1_EXP] = "EXP" ) )

 

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/

 

 

@VahidDM 

Thank you very much , it work fine.

 

Paul

Welcome.

Appreciate your Kudos!!
Badges.jpg
 

LinkedIn | Twitter | Blog | YouTube 

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.