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
angrybearer
New Member

create a column based on multiple if clauses and a field parameter

Hello everyone,

I am really new to Power BI. I am trying to create a column that has some values dependent on a field parameter so that "what-if" scenarios can be visualized dynamically.

The column was built by copying an existing column, except for the rows that respect certain criteria. In the latter case, the value is multiplied by the parameter value. 

The column's code is:

Final_Column = if(Table[Criteria_Column]="ID1",Table[Starting_Column]*(1-'Parameter1'[Parameter1 Value]),(IF(Table[Criteria_Column]="ID2",Table[Starting_Column]*(1-'Parameter2'[Parameter2 Value]),Table[Criteria_Column])))

The column is created correctly with the default values of the 2 parameters. However, when I try to change the selected value of either parameter the cells values remain unchanged. It seems as if only the default value can be used to create a column this way.

What am I doing wrong? Is it possible to solve this problem?

 

Thank you for your help

1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

hi @angrybearer 

That is the intended behavior of the SW. Calculated column is not responsive to report visuals, including the what-if slicer. 

Try to create visuals based on a measure which references your field parameter.

View solution in original post

2 REPLIES 2
angrybearer
New Member

Dear @FreemanZ ,

Thank you so much for your answer.

In the end, I was able to get the desired result using a measure.

FreemanZ
Super User
Super User

hi @angrybearer 

That is the intended behavior of the SW. Calculated column is not responsive to report visuals, including the what-if slicer. 

Try to create visuals based on a measure which references your field parameter.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.