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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
kahn_ohara
Frequent Visitor

Dynamic Calculated Column as Visual dimension

My understanding is that Power BI calculated columns are calculated at workbook opening time and can't be modified afterward. Measures are the only way to get dynamic calculations (I suppose there's also parameter fields giving some flexibility to switch which calculated columns are used based on the user's selection). I am coming from tableau where dynamic calculated columns are supported. Can someone please tell me what would be the Power BI recommended approach to the problem below:

 

I have a sales table. I want to make a chart breaking out many measures based on whether price is >= or < user input X, which is allowed to vary. I know I can make 2 versions of each measure I care about, one scanning rows where price is >= X and another where price < X. However, this doesn't get me the visual I want and I need to make tons of unecessary measures. I know there are calculation groups to make these measures but they require an external tool and also this just seems like a burden coming from Tableau. Is it possible to make a chart like below using another approach besides what I just described? 

 

User input price X: 

 

Sales Price     measure 1    measure 2 measure2 
>= X509011
< x 703010 
1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @kahn_ohara 

 

You are correct. Calculated columns in Power BI cannot be dynamic according to user input in the report. Only measures and what-if parameters can be dynamic. However, measures and what-if parameters cannot be used as visual dimension fields. They can only be used as value fields. So you need a table column as a dimension field, which can provide segmentation/filter for other measures. 

 

For example, I add a Group table which only has values 1 and 2. These two values will be used in other measures to provide different calculations for two groups. To show ">=X" and "<X" values, I use a measure and a what-if parameter. 

vjingzhang_0-1683098444228.png

So the result is similar to below. 

vjingzhang_1-1683098741587.png

The problem is that the Group column cannot be removed from the table visual. It should be there to act as a dimension field because all other measures cannot do that job. I have attached a sample file at bottom. Hope this would be helpful. 

 

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

View solution in original post

4 REPLIES 4
v-jingzhang
Community Support
Community Support

Hi @kahn_ohara 

 

You are correct. Calculated columns in Power BI cannot be dynamic according to user input in the report. Only measures and what-if parameters can be dynamic. However, measures and what-if parameters cannot be used as visual dimension fields. They can only be used as value fields. So you need a table column as a dimension field, which can provide segmentation/filter for other measures. 

 

For example, I add a Group table which only has values 1 and 2. These two values will be used in other measures to provide different calculations for two groups. To show ">=X" and "<X" values, I use a measure and a what-if parameter. 

vjingzhang_0-1683098444228.png

So the result is similar to below. 

vjingzhang_1-1683098741587.png

The problem is that the Group column cannot be removed from the table visual. It should be there to act as a dimension field because all other measures cannot do that job. I have attached a sample file at bottom. Hope this would be helpful. 

 

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

Thank you! 

 

I will say that coming from a Tableau or Sql background this seems like a fairly big limitation, but the solution you shared defniitely will get the job done and that is good. I will just note to future readers that as of 5/3/2023 the what if parameter can only accept a finite range of values and can't have more than 1002 values. See below.

 

https://community.powerbi.com/t5/Community-Blog/Why-is-it-sometimes-not-possible-to-select-the-exact...

 

So for example, a parameter with range from -20 to 20 with increments of .01 is impossible because this would be 40 x 100 = 4,000 individual values > 1002 values. The fact that you also can't just have an arbitrary floating number parameter with no limits also seems quite wonky to me. 

amitchandak
Super User
Super User

@kahn_ohara, Are you looking for dynamic Segmentation

Dynamic Segmentation Bucketing Binning
https://community.powerbi.com/t5/Quick-Measures-Gallery/Dynamic-Segmentation-Bucketing-Binning/m-p/1...


Dynamic Segmentation, Bucketing or Binning: https://youtu.be/CuczXPj0N-k

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

@amitchandak Thank you so much. Your video has really helped me resolve the issue.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.