Forum Discussion
User Input - Different parameter for each line
Hi
Is it possible to generate a list of products that allows the user to enter a different discount % for each line? So in example below the user would add the products and then for each line the user can add a different discount %
Is this possible in Power BI?
| Wholesale | Discount % | Discount | Price | |
| Product A | 100 | 5 | 5 | 95 |
| Product B | 100 | 10 | 10 | 90 |
| Product C | 100 | 20 | 20 | 80 |
- Anonymous5 years ago
Hi AndySmith,
According to your description, I think your scenario may not suitable for power bi usage.
Perhaps you can do these interactions externally (e.g. powerapps) and use power bi to design the visualization of these results.Power Apps Community - Power Platform Community (microsoft.com)
Regards,
Xiaoxin Sheng
5 Replies
- amitchandakSuper User
AndySmith , You can write a calculated column to do that
New column =
Switch( [Product] ,
"Product A", .05,
"Product B", .03,
// add more
.02
)
- FarhanAhmedCommunity Champion
You may create a powerapps visuals to write back to data source and use same source in your report
https://visualbi.com/blogs/microsoft/powerbi/power-apps-visual-power-bi/
https://docs.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-powerapp
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/powerapps-custom-visual
Otherwise if you want to fix discounts for all products then you can also use What-If parameters to replace your discount values to parameterized values.
https://docs.microsoft.com/en-us/power-bi/transform-model/desktop-what-if
https://blog.enterprisedna.co/scenario-analysis-using-what-if-parameters-in-power-bi/
https://radacad.com/power-bi-what-if-parameters
- Jihwan_KimSuper User
Hi, AndySmith
Please check the below picture and the sample pbix file's link down below, whether it is what you are looking for.
All measures are in the sample pbix file.
https://www.dropbox.com/s/r8nt5aopco7rfly/andysmith.pbix?dl=0
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
- AndySmithHelper III
Thank you Jihwan_Kim - however the purpose of this would be to create a wine list for a resturaunt and therefore could have any number of different products. I think that Power BI is probably not the solution for this!
- AnonymousNot applicable
Hi AndySmith,
According to your description, I think your scenario may not suitable for power bi usage.
Perhaps you can do these interactions externally (e.g. powerapps) and use power bi to design the visualization of these results.Power Apps Community - Power Platform Community (microsoft.com)
Regards,
Xiaoxin Sheng