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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Kudoed Authors