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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.