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
tucahernandes
Regular Visitor

Keep Filter on Dax Measure and Allowing Other Slicers at the Same Time

I need a measure which at the same time, when I select na owner of a store (field franqueado), it brings me the all amount of the region involved (field região).

 

If for instance, I select the owner "Peter" and he is from South region, the same should bring me the all amount of the South region

That's ok so far, I've made it with the measure below:

 

CALCULATE (
[Qtd Vendida],
ALL(vw_pbicompras_lojas),
KEEPFILTERS ( vw_pbicompras_lojas[regiao] IN VALUES ( vw_pbicompras_lojas[regiao] )
))

 

The problem: the same measure should also consider the selection of the field clube presented on the same table. And this doesn't happen currently, because of the All on the measure.

 

What are the needed adjustments on the measure above, so that it could consider the slicers selections of the field clube?

 

tucahernandes_0-1727357212143.png

 

dssgasg

3 REPLIES 3
DataInsights
Super User
Super User

@tucahernandes,

 

You can replace ALL with ALLSELECTED to keep external filters (e.g., slicers).

 

CALCULATE (
    [Qtd Vendida],
    ALLSELECTED ( vw_pbicompras_lojas ),
    KEEPFILTERS ( VALUES ( vw_pbicompras_lojas[regiao] ) )
)

 





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

Proud to be a Super User!




Hi, 

It didn't work. With your measure, when I select "franqueado" on slicer, it brings me only the franqueado's value. And I need the all amount of the related region (field "região).

@tucahernandes,

 

Would you be able to provide sample data or a pbix link (OneDrive, etc.)?





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

Proud to be a Super User!




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!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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