Join 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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I have created a table which holds the demographic variables used in various stacked bar charts.:
I was wondering if there was any way I could then use the SWITCH function to select the AXIS or Legend source, like I would for the measure:
X Measure = SWITCH(ALLSELECTED('Chart Measures'[Measure 1]),"Age", SELECTCOLUMNS(TransportCharge,[PatientAge]),"Ethnicity",SELECTCOLUMNS(Ethnicity,[EthnicCategory]),"Months",SELECTCOLUMNS(TransportCharge,[Transportation Month]),"Deprivation",SELECTCOLUMNS('Census Data',[Deprivation Group]))
Hi @gary_connolly,
Here is a similar thread in which some solutions are mentioned there. Could you go to check if it helps in your scenario? ![]()
Regards
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 41 | |
| 39 | |
| 37 | |
| 29 | |
| 24 |
| User | Count |
|---|---|
| 119 | |
| 100 | |
| 72 | |
| 69 | |
| 65 |