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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
rokas147
Frequent Visitor

A dynamic percentage slider for data

Hi Power BI, 

 

I need some help with the sliders. Let's simplify the data:

1. I have positive savings data

2. I need a slider ranging from 0% to 100%, which I manage to create through Modelling -> New Parameter. 

3. I want to get a new data, positive savings * percentage= positive savings due to cost avoidance. 

 

Questions:

1. How can I create a dynamic percentage slicer that would directly correspond with positive savings data. I mean, I would love to have a bar chart for positive savings due to cost avoidance, a slider close by, and have this data changing if the slider changes.

2. Is it possible to have such slider set at let's say 60%, meaning, after opening, slider value would first show 60% and the client/customer could adjust the slider and see the effects on the positive savings due to cost avoidance.

 

Cheers,

Thank you

1 ACCEPTED SOLUTION

Hi @rokas147,

Sure, you can take a look at the following steps:

1. Create a new calculated table to generate the values which slicer used. 

 

Table =
GENERATESERIES ( 1, 100, 1 )

 

2. Create a slicer with the above table field.
3. Write a measure expression to summarize raw table values and calculate based on slicer selections.

 

measure =
VAR selected =
    SELECTEDVALUE ( Table[Value], 100 ) / 100
RETURN
    CALCULATE ( SUM ( 'RawTable'[Amount] ), ALLSELECTED ( 'RawTable' ) ) * selected

 

Notice: new table does not have a relationship to raw table, new slicer requires to interact with raw table visuals.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

3 REPLIES 3
v-shex-msft
Community Support
Community Support

Hi @rokas147,

Current power bi does not support to create a dynamic calculated column/table based on filter selections.
You can create a measure formula to extract the current fact table value and calculate it with slicer values, then you can use it on your chart and it will dynamic changes based on selections.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Hi, 

 

Thank you for that. Could you be slightly more specific on how could I create this measure formula? Sorry, if that seems quite amateurish but I have started working on Power BI a couple of weeks ago. Hence, any help is highly appreciated. 

 

Cheers

Hi @rokas147,

Sure, you can take a look at the following steps:

1. Create a new calculated table to generate the values which slicer used. 

 

Table =
GENERATESERIES ( 1, 100, 1 )

 

2. Create a slicer with the above table field.
3. Write a measure expression to summarize raw table values and calculate based on slicer selections.

 

measure =
VAR selected =
    SELECTEDVALUE ( Table[Value], 100 ) / 100
RETURN
    CALCULATE ( SUM ( 'RawTable'[Amount] ), ALLSELECTED ( 'RawTable' ) ) * selected

 

Notice: new table does not have a relationship to raw table, new slicer requires to interact with raw table visuals.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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