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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Raj007
Helper III
Helper III

expression returning the sum instead of average of those mentioned in the filter

Hi All, need some help on the following measure...the simple distinctcount works without any issue..when i filter specific to the values 

iam getting the wrong value

 

1).x axis value is from a mapping table which is joined in the model

2).measure is from the table where i count the change numbers

I have  the old version of Power BI (may 2020) where i cannot use the average line expression or formula so i have to

calculate the expression in  a card and show it within the bar graph for the 3 values only..(i do not want to include the CR 122)

 

this is my measure

vTest3=

var test =

AverageX(Values('CRMR'[Release Name]),

Calculate(DistinctCountNoBlank'('CGRChange'[Change_Number]),

FILTER(ALL('CRMR'[Release Name]),'CRMR'[Release Name] IN 

{"CR321","CR221","CR121"}
)  //filter

)  //calculate

) //average

return test

 

this expression is giving me 102 which is sum of CR121,CR221,CR321

 

 

 

IMG_1362.jpg

3 REPLIES 3
Anonymous
Not applicable

Hi @Raj007 ,

 

Any updates?

 

Best Regards,
Eyelyn Qin

Anonymous
Not applicable

Hi @Raj007 ,

 

Since there are two tables on your side, I'd suggest you provide some details about your table fields , the relationship between the two tables and your expected output to help us clarify your scenario.Or share me with your pbix file after removing sensitive data.

 

You may kindly refer to:

How to provide sample data in the Power BI Forum - Microsoft Power BI Community

How to Get Your Question Answered Quickly - Microsoft Power BI Community

Best Regards,
Eyelyn Qin

Ashish_Mathur
Super User
Super User

Hi,

Share the link from where ican download your PBI file.


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

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.