This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
I want users to be able to select an item from a slicer and see a report for all items in the same category.
I have a table similar to this:
COUNTRY | REGION | POPULATION | OECD_MEMBER
Australia | Oceania | 24,000,000 | True
Austria | Europe | 8,747,000 | True
Belgium | Europe | 11,350,000 | True
China | Asia | 1,379,000,000 | False
Ecuador | South America | 16,390,000 | False
Fiji | Oceania | 898,760 | False
Each REGION can contain multiple COUNTRIES but a country can only be in one region.
I want users to select an entry from the COUNTRY column and see the population of its REGION, stacked by OECD_MEMBER status. For instance, selecting AUSTRALIA would show a bar for OCEANIA with 96% under TRUE (representing Australia) and 4% under FALSE (representing Fiji).
I have created a slicer for COUNTRY but I cannot figure out how to set a visual filter based on the selected country's REGION.
Solved! Go to Solution.
Hi amos_jevons,
To achieve your requirement, create a measure using dax formula below:
Result = VAR region = CALCULATE(MAX(Table1[REGION]), FILTER(ALL(Table1), Table1[COUNTRY] = SELECTEDVALUE(Table1[COUNTRY]))) VAR total = CALCULATE(SUM(Table1[POPULATION]), FILTER(ALL(Table1), Table1[REGION] = region)) return CALCULATE(MAX(Table1[POPULATION]), FILTER(ALL(Table1), Table1[COUNTRY] = SELECTEDVALUE(Table1[COUNTRY]))) / total
Regards,
Jimmy Tao
Hi amos_jevons,
To achieve your requirement, create a measure using dax formula below:
Result = VAR region = CALCULATE(MAX(Table1[REGION]), FILTER(ALL(Table1), Table1[COUNTRY] = SELECTEDVALUE(Table1[COUNTRY]))) VAR total = CALCULATE(SUM(Table1[POPULATION]), FILTER(ALL(Table1), Table1[REGION] = region)) return CALCULATE(MAX(Table1[POPULATION]), FILTER(ALL(Table1), Table1[COUNTRY] = SELECTEDVALUE(Table1[COUNTRY]))) / total
Regards,
Jimmy Tao
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 30 | |
| 23 | |
| 21 | |
| 18 | |
| 17 |
| User | Count |
|---|---|
| 63 | |
| 35 | |
| 34 | |
| 24 | |
| 23 |