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

Dynamic Column in a Table based on the Parameter Value

Hello all,

 

I have been trying to create a column in an already-existing table, which values should be changing based on the parameter value provided by the user in a slicer. 

 

For that, I created a new parameter (numeric range) and added a calculated column to my table.

 

Parameter Hours p.a. = GENERATESERIES(0, 10000, 1000)
Parameter Hours p.a. Value = SELECTEDVALUE('Parameter Hours p.a.'[Parameter Hours p.a.], 25)
Total hours = 'Table'[Age] * 'Parameter Hours p.a.'[Parameter Hours p.a. Value]
 
However, the only thing I see in my table is alternate result (25), as if no value was selected. 
 
I would need this table to be updated automatically after clicking enter, so that my Python visual gets updated once the user chooses different parameter values. Is there any way to achieve that in DAX?
 
Thank you in advance!
2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@karolinaa , You have to create a measure , the column can not use the selected value

 

Total hours = Sumx('Table', 'Table'[Age] * SELECTEDVALUE('Parameter Hours p.a.'[Parameter Hours p.a.], 25) )

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

Hello @v-jingzhang,

 

Thanks for your answer! In my Python visual, I am trying to build a 3D graph and Total hours are one of its dimensions (Total hours, Age, Price).

 

For now I entered the values manually and it works, however, I would need to calculate the Total hours for every 20 records in my table based on the user's input. Ideally, that would update the table on which my visual is based. I don't think it is possible to be done with a measure. Is there any workarounds that you're aware of?

 

Thanks and best regards!

View solution in original post

4 REPLIES 4
karolinaa
Frequent Visitor

My issue was solved by creating indeed all different measures. This did not update my data table, however, I created a table visual that was working properly. It turned out I was able to use those measures to create a python visual and it is working! Thank you!

v-jingzhang
Community Support
Community Support

Hi @karolinaa 

 

Calculated columns cannot be updated by slicer values. This is by design. In this scenario, your calculated column cannot get the selected value of the parameter so it always chooses the alternative value 25. 

 

Where do you use this calculated column in your Python visual? Is it possible to use a measure at the same place?

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it. Highly appreciate your Kudos!

 

Hello @v-jingzhang,

 

Thanks for your answer! In my Python visual, I am trying to build a 3D graph and Total hours are one of its dimensions (Total hours, Age, Price).

 

For now I entered the values manually and it works, however, I would need to calculate the Total hours for every 20 records in my table based on the user's input. Ideally, that would update the table on which my visual is based. I don't think it is possible to be done with a measure. Is there any workarounds that you're aware of?

 

Thanks and best regards!

amitchandak
Super User
Super User

@karolinaa , You have to create a measure , the column can not use the selected value

 

Total hours = Sumx('Table', 'Table'[Age] * SELECTEDVALUE('Parameter Hours p.a.'[Parameter Hours p.a.], 25) )

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 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 Solution Authors