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
Anonymous
Not applicable

Dynamic Chosen dimension with slicer

Hi All, 

 

As per the visual below, I try to create a field in PowerBI that enables me to switch the X-axis to different dimensions (in this example just 2: switch to Region or Country).

MarkNL187_1-1712908748892.png

 

Note that the PowerBI is connected to Azure Analysis services, so I can't use options like creating parameters.

What I've tried:

Step 1) Create a new table with 2 categories (Country and Region), which I can use as a slicer:  (SelectedDimension[Dimension])

2) Create a calculated column in the FactValue table that picks the correct column based on the slicer: 

if('SelectedDimension'[Dimension]="Country", 'DimSite'[SiteCountry],'DimSite'[SiteRegion])

 Unfortunately, this dax gives the error: A single value for column 'SiteCountry' in table 'DimSite' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.

 

The DimSite table looks like:

MarkNL187_0-1712908434175.png

 

I'm trying include the DAX calculations through Tabular Editor, happy to look for a solution I can write in DAX. If all fails I can always bring in the 'bookmark' solution

 

Thank you!

 

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

Note that the PowerBI is connected to Azure Analysis services, so I can't use options like creating parameters.

Change the connection to DirectQuery with local model. Then you can create Field Parameters.

View solution in original post

1 REPLY 1
lbendlin
Super User
Super User

Note that the PowerBI is connected to Azure Analysis services, so I can't use options like creating parameters.

Change the connection to DirectQuery with local model. Then you can create Field Parameters.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.