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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Create a slicer for a fictive price point

Hi all,

Hope you can help me find a solution for the following:


Background:

I have a dataset that looks like the table below. I match the price of my article with the prices of my competitors.

I can then see the impact ($ difference) with the number of sales and the difference between my and my competitors pricing.

 

ArticleMy priceCompetitorCompetitor PriceDifferenceSold items$ difference
Bread$1,00Supermarket 1$1,100,10252,50
Bread$1,00Supermarket 2$1,000250
Bread$1,00Supermarket 3$0,80-0,2025-5,00

 

The total diffence for Bread is -$2,50 (2,50 + 0 + -5,00) at my current price point of $1,00.

 

Question: 

I want to make a slider that makes a fictive price for the column 'My Price' to see how this would change my $ difference.

So for example, if I make my price of bread to $0,95, how much would be $ difference be? 

 

Is there a way of making a fictive variable that I can put in a slicer?



Hope someone has a helpful tip for this 🙂 Thanks in advance!

2 ACCEPTED SOLUTIONS
johnt75
Super User
Super User

You can create a numeric range parameter. That will add a slicer to the page and create a measure to return the selected value, so your measure for difference would be something like

Difference =
SUMX (
    'Table',
    ( 'Table'[Competitor price] - [My price value] ) * 'Table'[num sold]
)

View solution in original post

In your difference measure where you would have referenced the difference column from the table you now reference the parameter value, as in the code sample I posted. Then when you put the difference measure in a visual it will change as you change the slicer.

View solution in original post

4 REPLIES 4
johnt75
Super User
Super User

You can create a numeric range parameter. That will add a slicer to the page and create a measure to return the selected value, so your measure for difference would be something like

Difference =
SUMX (
    'Table',
    ( 'Table'[Competitor price] - [My price value] ) * 'Table'[num sold]
)
Anonymous
Not applicable

Hi Johnt75,

 

Thanks for your reply!

I am not sure I understand.
So when I've made the parameter as described above, and changed the measure into the calculation, it shows up like this:

 difference measure parameter.png

 

I've added the parameter as a slicer, but it doesnt do anything yet (as I've probably missed something crucial).
How does the parameter change the outcome of the data exactly?

Sorry if this is confusing, parameters are very new to me

In your difference measure where you would have referenced the difference column from the table you now reference the parameter value, as in the code sample I posted. Then when you put the difference measure in a visual it will change as you change the slicer.

Anonymous
Not applicable

Hi @johnt75, Sorry for my late reply. Your solution works!

 

There is something in my original dash (model/file source related) that doesnt work with the solution, so hence I was so puzzled. But on a different simplified dash, it works great.

Thanks for the time and effort 🙂

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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