Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hello,
I would apprecite if anyone could help me with this question.
In simple words, I have an excel sheet that i imported to power bi. There is one table"Product" that has two columns namely "Product Name" and "Price".
i have a report in power bi desktop with a line chart that shows the products on x axis and their current prices on y axis. Note that each row is a unique product with its retail price.
I want the end user to enter two vales as "minimum discount" and "maximum discount" using a slicer, and that results in two more lines on the chart depicting the discounted price.
-I have tried calculated column for min and max discounted price for each product by creating formula using the selected slicer value. The problem is that the price does not change when i change the slicer value, although it show the new slicer value every time i change it.
-I tried using parameters and measures but measures work on aggregates and i have unique products and prices.
Thank you.
Solved! Go to Solution.
Hi @SKan ,
According to your description, here's my solution.
Sample:
1.Create two parameters.
Then two slicers are created, you can enter the discount in each slicer.
2.Creat two measures.
MaxD =
MAX ( 'Product'[Price] ) * 'Max Discount'[Max Discount Value]
MinD =
MAX ( 'Product'[Price] ) * 'Min Discount'[Parameter Value]
Put the measures in line chart Y-axis, get the result:
I attach my sample below for your reference.
Best regards,
Community Support Team_yanjiang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @SKan ,
According to your description, here's my solution.
Sample:
1.Create two parameters.
Then two slicers are created, you can enter the discount in each slicer.
2.Creat two measures.
MaxD =
MAX ( 'Product'[Price] ) * 'Max Discount'[Max Discount Value]
MinD =
MAX ( 'Product'[Price] ) * 'Min Discount'[Parameter Value]
Put the measures in line chart Y-axis, get the result:
I attach my sample below for your reference.
Best regards,
Community Support Team_yanjiang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @SKan
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
User | Count |
---|---|
84 | |
79 | |
69 | |
46 | |
43 |
User | Count |
---|---|
106 | |
50 | |
49 | |
40 | |
39 |