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.
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.
Article | My price | Competitor | Competitor Price | Difference | Sold items | $ difference |
Bread | $1,00 | Supermarket 1 | $1,10 | 0,10 | 25 | 2,50 |
Bread | $1,00 | Supermarket 2 | $1,00 | 0 | 25 | 0 |
Bread | $1,00 | Supermarket 3 | $0,80 | -0,20 | 25 | -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!
Solved! Go to Solution.
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]
)
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.
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]
)
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:
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.
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 🙂
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
47 | |
26 | |
19 | |
15 | |
10 |
User | Count |
---|---|
57 | |
50 | |
44 | |
21 | |
19 |