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
ringovski
Helper II
Helper II

Dynamic Country Filter

Hi All,

I was wondering if it is possible to make a dynamic filter based on a selected country and update a matrix table based on it.

 

Countries are broken into Selected Country, All Countries, Rest of World (all-selected). Obviously the selected country changes as per user selection from a filter\slicer.

 

Data structure is a pretty simple star schema with fact table and related dimesions,Dim_Date, Dim_Product, Dim_Country etc.. join on Country_sk to Country id. 

 

 

 Export_Fact_Codes       
        
calendar_sk country_sk loading_sk discharge_sk product_code_sk state_sk quantity_sk value$
30010016001211 4001328967  
30010116011212 600 84353905  
30010226031212 800 41839
30110016001212 900 12888454  
30110126011213 1000 27880729  
30110226021213 200 230237  

 

 

 

Dim_Country 
CountryIDFull_Country_Name
100Afghanistan
101Albania
102Algeria
103Angola
104Australian Antarctic Territory
......

 

Requested Matrix Table

 

Product_Code  2022  20222022
   All Countries   Selected_Country  Rest of World
         code 110 1916114 844496 1071619
         code108 73693 68878 4816
         code101 11571 13371 98201
    

 

I can do it for a single selected country by adding a additional conditional column in the Dim_Country, 'Groupings'  China = China ELSE 'Rest of World'. The diffcult part is changing the selected country dynamically.

 

Thanks for any assistance.

1 REPLY 1
Idrissshatila
Super User
Super User

Hello @ringovski ,

 

Check if this video will help in your case https://youtu.be/nWgPynP9XDM?si=6cdpqmFptOFgBkLb

 

If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

Follow me on Linkedin
Vote For my Idea💡

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

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!

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.