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
Kavitha10
Frequent Visitor

Dynamic column calculation based on user selection

Hi All,

 

I would like to know if we can dynamically calculate column values in powerbi based on user selection

 

For example,
If user selects 1 from the selection filter, then my Result column should calculate as 'Col_A * 1'

Kavitha10_0-1618905201937.pngKavitha10_3-1618905313313.png

whereas if user selects 0 from the selection filter, then my Result column should calculate as 'Col_A * 0'

Kavitha10_4-1618905340974.pngKavitha10_5-1618905370669.png

Thanks in advance!

 

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi, @Kavitha10 

Please check the below picture and the measure.

The sample pbix file's link is down below.

 

Picture5.png

 

Result =
SUMX('Table', 'Table'[COL_A] * SELECTEDVALUE('Switch'[Switch],1))
 
 
 
 

Hi, My name is Jihwan Kim.


If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.


Linkedin: https://www.linkedin.com/in/jihwankim1975/


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

2 REPLIES 2
Jihwan_Kim
Super User
Super User

Hi, @Kavitha10 

Please check the below picture and the measure.

The sample pbix file's link is down below.

 

Picture5.png

 

Result =
SUMX('Table', 'Table'[COL_A] * SELECTEDVALUE('Switch'[Switch],1))
 
 
 
 

Hi, My name is Jihwan Kim.


If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.


Linkedin: https://www.linkedin.com/in/jihwankim1975/


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Awesome, it worked! Thanks much.

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.

Top Solution Authors