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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register 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

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

Awesome, it worked! Thanks much.

Helpful resources

Announcements
Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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