Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Anonymous
Not applicable

Dynamic Calculated Column based on field parameter selection

Hello, 

 

I created a field parameter to allow users to aggregate data by Column A or Column B.

Both of these columns store Month values (01,02,03, and so forth). 

Column A stores "Production" Months

Column B stores "Sandbox" Months


I would like to create a third dynamic column that displays Production Or Sandbox months

(depending on the users' parameter selection). 


I was hoping to use this dynamic column to join out to a dimCalendar table, so I can bring in additional information, such as # or work days within each month, etc.. 

 

I tried creating this calculated column, but I can't seem to get it to work.

Any suggestions?  Maybe I'm going about this the wrong way.

 

Toggle Sandbox/Prod Month =
VAR MySelection =
SELECTEDVALUE ( 'Parameter: Prod or Sandbox'[Parameter Name])
RETURN
SWITCH (
TRUE (),
MySelection =  "Production", Forecast[Budget Month],
MySelection =  "Sandbox", Forecast[Sandbox Month]
)
1 REPLY 1
lbendlin
Super User
Super User

 dynamic column

There is no such thing in Power BI.  Columns are static. Measures are dynamic.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

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.