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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
sameergupta60
Helper IV
Helper IV

Need Help

hi 

 

in the below example Matri table, I want the avg range between 5 to 45. please suggest the formula.

in the below example it includes all column data & generates Avg.  

sameergupta60_0-1606219982492.png

Another example is given below

11313
21515
32121
42121
52828
648 
793 
Avg 3419.6

Regards,

Sameer 

 

 

 

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

Hi, @sameergupta60 

 

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

Table:

d1.png

 

You may create a measure as below.

Result = 
IF(
    ISINSCOPE('Table'[Category]),
    SUM('Table'[Val]),
    AVERAGE('Table'[Val])
)

 

Result:

d2.png

 

Best Regards

Allan

 

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

2 REPLIES 2
v-alq-msft
Community Support
Community Support

Hi, @sameergupta60 

 

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

Table:

d1.png

 

You may create a measure as below.

Result = 
IF(
    ISINSCOPE('Table'[Category]),
    SUM('Table'[Val]),
    AVERAGE('Table'[Val])
)

 

Result:

d2.png

 

Best Regards

Allan

 

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

amitchandak
Super User
Super User

@sameergupta60 , Try like

averageX(filter(table, table[value]>= 5 && table[value]<= 45),table[Value])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 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.