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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
smorrisbfc123
Frequent Visitor

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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Solution Authors