Forum Discussion
DineshbabuR
2 years agoNew Member
Help with Building Comparison Carts in Power BI
Hi Team, I'm working on a Power BI project where I have several tables, including Products, Costs, and Past Selling History. The values in the Costs and Past Selling History tables only includ...
- 2 years ago
Ensure you have a Products table with at least ProductID and UnitPrice
- Go to the Modeling tab and create What-If parameters for each cart (e.g., Quantity_Cart1, Quantity_Cart2, Quantity_Cart3).
- Set the data type to Whole Number and define a reasonable range for the quantity.
Create measures:
Total_Cart1_Price =
SUMX(
Products,
Products[UnitPrice] * [Quantity_Cart1 Value]
)Similarly for Cart 2 and 3.
- Use slicers to allow users to select products.
- Add cards or tables to display the total prices of each cart.
ToddChitt
Super User
2 years agoTechnically speaking, yes, it can probably be done. You can also eat soup with a fork if you want, but that'st not the best tool for the job!
You should explore What If parameters: Use parameters to visualize variables - Power BI | Microsoft Learn
They are basically user inputs into your model. They differ from Power Query Parameters.
You may need to have three of them, for each of the three different products.