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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
cbruhn42
Helper III
Helper III

Calculate Average excluding excluded values

I have a report that shows values on a line chart and then a card that displays the average of the values.

 

Is there a way to look for excluded values on my line chart and calculate the average in the card?

3 REPLIES 3
Ritaf1983
Super User
Super User

Hi @cbruhn42 

Yes, there are options to achieve this! You have two main approaches:

1. Use a Visualization-Level Filter: You can apply a filter directly on the line chart to exclude specific values. This will ensure that only the filtered values are displayed on the chart, while the card can calculate the average without applying the same filter.

Ritaf1983_0-1730342241176.png

 

2. Create Two Separate Measures: One measure for the line chart and another for the card. For the line chart measure, you can use the CALCULATE function with a filter to exclude the desired values.

Here’s an example formula for the line chart measure:

DAX
Copy code
LineChartMeasure =
CALCULATE(
[YourOriginalMeasure],
FILTER('YourTable', 'YourTable'[YourColumn] <> "ExcludedValue")
)
Replace [YourOriginalMeasure] with the measure you’re using for values, 'YourTable' with your table name, and specify the condition in the FILTER function to exclude the values you don’t want on the line chart.

For more specific suggestion 

Please provide a workable sample data and your expected result from that. It is hard to figure out what you want to achieve from the description alone.  

https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

 

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

So, I want to exclude the values that I right click on and select exclude.  So they show up in the Filter pane on the right.  How do I reference those values for my measure on the card.

 

I want the card to calculate the average by excluding those excluded values from the line chart visual.

Irwan
Memorable Member
Memorable Member

hello @cbruhn42 

 

i am not sure how your data to be excluded looks like, but to exclude a group of certain value in visual, you can use visual filter.

 

Otherwise, you might want to change the DAX in order to filter those values so it will not appear in your visual. something like CALCULATE('expression',FILTER('Table','expression)).

 

Thank you.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.