Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
I have data from three different sources : municipalities, departments and regions (French geography).
I want the user to select different municipalities.
Then I would like to display one graphic showing :
- the aggregated data for all the municipalities selected (average, sum, or different calculations in function of the data) --> I have calculated measures in order to get those aggregated values
- the data for each municipality selected
- the data for the department of the selected municipalities
- the data for the region of the selected municipalities
- the data for the whole country
However, for the moment, I'm only able to display one graphic per item : one graphic for the agreggated municipalities, one for all the municipalities, etc...
Here is the link to my document : https://drive.google.com/file/d/1ssCtPiPmy9etZ7z1F4cg0BBvZ2sWyhAj/view?usp=sharing
Thank you for your help!!
Solved! Go to Solution.
Hi @MarianaL ,
I checked out your pbix file, but am a bit skeptical about your needs.
1.What is the scope of 'data'? Just the corresponding 'Department' and 'Region' names? Or all the data in the corresponding row?
- the data for the department of the selected municipalities
- the data for the region of the selected municipalities
Please use the 'RELATED' function
RELATED function (DAX) - DAX | Microsoft Learn
Departement = MAXX('Communes_2022',RELATED(Departements_2022[LIBELLE]))Region = MAXX('Communes_2022',RELATED('Régions_2022'[LIBELLE]))
2.Please use the 'CONCATENATEX' function.
CONCATENATEX function (DAX) - DAX | Microsoft Learn
the data for each municipality selectedData = CONCATENATEX('Communes_2022','Communes_2022'[LIBELLE] & UNICHAR(10) & 'Communes_2022'[Ville, Région, Département, France])
3.I noticed that you can only show '2021' data here, if you want to show data for the other two years, please create the table manually and create the measures based on my expression instead of using the quick measure
0-14 =
VAR _slicer = SELECTEDVALUE('Table'[Year])
RETURN
SWITCH(TRUE(),
_slicer = 2010,SUM('Evol_Struc_Pop_2010'[Pop 0-14 ans en 2010 (princ)]),
_slicer = 2015,SUM(Evol_Struc_Pop_2015[Pop 0-14 ans en 2015 (princ)]),
_slicer = 2021,SUM(Evol_Struct_Pop_2021[Pop 0-14 ans en 2021 (princ)])
)15-29 =
VAR _slicer = SELECTEDVALUE('Table'[Year])
RETURN
SWITCH(TRUE(),
_slicer = 2010,SUM('Evol_Struc_Pop_2010'[Pop 15-29 ans en 2010 (princ)]),
_slicer = 2015,SUM(Evol_Struc_Pop_2015[Pop 15-29 ans en 2015 (princ)]),
_slicer = 2021,SUM(Evol_Struct_Pop_2021[Pop 15-29 ans en 2021 (princ)])
)
I can't upload your file to the forums because it's too big.
Best Regards,
Wenbin Zhou
Hi @MarianaL ,
I checked out your pbix file, but am a bit skeptical about your needs.
1.What is the scope of 'data'? Just the corresponding 'Department' and 'Region' names? Or all the data in the corresponding row?
- the data for the department of the selected municipalities
- the data for the region of the selected municipalities
Please use the 'RELATED' function
RELATED function (DAX) - DAX | Microsoft Learn
Departement = MAXX('Communes_2022',RELATED(Departements_2022[LIBELLE]))Region = MAXX('Communes_2022',RELATED('Régions_2022'[LIBELLE]))
2.Please use the 'CONCATENATEX' function.
CONCATENATEX function (DAX) - DAX | Microsoft Learn
the data for each municipality selectedData = CONCATENATEX('Communes_2022','Communes_2022'[LIBELLE] & UNICHAR(10) & 'Communes_2022'[Ville, Région, Département, France])
3.I noticed that you can only show '2021' data here, if you want to show data for the other two years, please create the table manually and create the measures based on my expression instead of using the quick measure
0-14 =
VAR _slicer = SELECTEDVALUE('Table'[Year])
RETURN
SWITCH(TRUE(),
_slicer = 2010,SUM('Evol_Struc_Pop_2010'[Pop 0-14 ans en 2010 (princ)]),
_slicer = 2015,SUM(Evol_Struc_Pop_2015[Pop 0-14 ans en 2015 (princ)]),
_slicer = 2021,SUM(Evol_Struct_Pop_2021[Pop 0-14 ans en 2021 (princ)])
)15-29 =
VAR _slicer = SELECTEDVALUE('Table'[Year])
RETURN
SWITCH(TRUE(),
_slicer = 2010,SUM('Evol_Struc_Pop_2010'[Pop 15-29 ans en 2010 (princ)]),
_slicer = 2015,SUM(Evol_Struc_Pop_2015[Pop 15-29 ans en 2015 (princ)]),
_slicer = 2021,SUM(Evol_Struct_Pop_2021[Pop 15-29 ans en 2021 (princ)])
)
I can't upload your file to the forums because it's too big.
Best Regards,
Wenbin Zhou
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 76 | |
| 37 | |
| 31 | |
| 29 | |
| 26 |