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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Power_MN
Helper I
Helper I

Change Value with Slicer // dynamic Value

Hello everyone, I am facing a big problem and I hope that someone here can help me with their expertise. I have created a report that compares a certain price, which is entered by the responsible department in an Excel file, with other prices (ranking, tabular display). The price should no longer be entered via the Excel file, but should be set in the report itself using a slicer. Thus, the consumer of the report can set the price directly in the report and does not always have to enter the price in the Excel file and ask for an refresh of the report. Thank you very much for your ideas and help! Kind regards and a nice day Michael
1 ACCEPTED SOLUTION
v-yingjl
Community Support
Community Support

Hi @Power_MN ,

Use what-if parameters and try to create measures like this:

Initial rank = 
RANKX(
    ALL('Table'),
    CALCULATE(SUM('Table'[Price])),,DESC,Dense
)


New Rank = 
IF(
    SUM('Table'[Price]) > 'Price reference'[Price reference Value], [Initial rank],
    RANKX(
        FILTER(
            ALL('Table'),
            'Table'[Price] <= 'Price reference'[Price reference Value]
        ),CALCULATE(SUM('Table'[Price])),,DESC,Dense
    )
)

re.png

 

Attached a sample file in the below, hopes it could help.

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-yingjl
Community Support
Community Support

Hi @Power_MN ,

Use what-if parameters and try to create measures like this:

Initial rank = 
RANKX(
    ALL('Table'),
    CALCULATE(SUM('Table'[Price])),,DESC,Dense
)


New Rank = 
IF(
    SUM('Table'[Price]) > 'Price reference'[Price reference Value], [Initial rank],
    RANKX(
        FILTER(
            ALL('Table'),
            'Table'[Price] <= 'Price reference'[Price reference Value]
        ),CALCULATE(SUM('Table'[Price])),,DESC,Dense
    )
)

re.png

 

Attached a sample file in the below, hopes it could help.

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-yingjl 

 

Works great! Thank you so much!


Kind regards and stay healthy!

Michael

selimovd
Super User
Super User

Hey @Power_MN ,

 

you can use the What-If-Parameter to get a range:

Use what-if parameters to visualize variables - Power BI | Microsoft Docs

 

In the measures you can then calculate with the SELECTEDVALUE of the What-If-Parameter.

Like this you should get your desired result.

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

Hello @selimovd ,

that was helpful! I'm one step closer to my goal.
How can I set the slicer or how can I write the measure, that it only effects one suppliers price?
Background: I want so show, what happens in the ranking, if the price of this particular supplier increase.

 

Thank you!

Kind regards

Michael

Hey @Power_MN ,

 

that's what is described in the link I posted.

You add a What if parameter:

5.png

 

When you press OK a slicer is created from this parameter:

6.png

In you Measure you can use the current value from the slicer with the SELECTEDVALUE function.

 
If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors