Showing results for 
Search instead for 
Did you mean: 
Helper III
Helper III


Hello, I need your help.

I am working on a PowerBI report which is connected to a "live connection" tabular model for which I am using a "Weight_PTF" measure.

This metric uses the ALLSELECTED function to calculate a ratio.



VAR CurrentAssetVal = [SEC_MarketValue_PTF]

VAR ParentAssetVal = CALCULATE ([SEC_MarketValue_PTF], ALLSELECTED ())

VAR RatioToParent = DIVIDE (CurrentAssetVal, ParentAssetVal)

RETURN RatioToParent



This metric works well when we use Excel and users are happy.

The problem comes when I use the indicator in PowerBI.

The trouble is that in my PBI report we have filters and we don't want those filters to affect our metric.

For example, on the visual we want to display a top N but without recalculating the ratio.

Do you have any idea how to bypass filters in Power BI reports?

Community Support
Community Support

Hi @Lidou_Cand ,


Using ALLSELECTED() function will calculate the filtered table. You may use ALL() function instead.

It's better to share some sample data and expected result if you need help with DAX formula.


Best Regards,


Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
Super User
Super User

@Lidou_Cand , you can use all, or disable interactions

Power BI Features || Datamarts: || Field Parameters :
Time Intelligence Decoded :
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!
Dashboard of My Blogs !! Connect on Linkedin !! Subscribe to my youtube Channel !!
Want To Learn Power BI | Beginners !! Advance Concepts !! Power BI For Tableau User !!
Super User
Super User

Hi @Lidou_Cand ,


This depends on the calculation you are doing and the type of filters you apply, in this case you will need to apply an ALL statement to your calculation that way when you do a TOPN the value will not be recalculated.


When using the ALLSELECTED the filter is applied to the selected values this means that if you have a list of 50 customers they are all included in the calculation when you apply a TOP 5 when using the all selected the calculation will only consider the 5 customers and not the 50. Using ALL you will overpass the filter context and return the full column(s).


Be aware that depending on the measure and the context you may need to use a temporary table or similar.


Miguel Félix

Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português

Helpful resources

August 2022 update 768x460.jpg

Check it Out!

Click here to learn more about the August 2022 updates!

August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors
Top Kudoed Authors