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.
Hello PowerBI Gurus,
I want to make a price calculator for materials. I have table with:
Table_1:
Product_ID, Product_Code, Unit_Price
-----
I have one new table with generated series to use as coefficient:
Variables_Table = GENERATESERIES(0;150;1)
-----
I have also one Measure to multiply the Unit_Price by the measure:
Calculated_Price = MAX(Table_1[Unit_Price])*MAX('Variables_Table '[Value])
----
I want to have 2 slicers for Product_Code and 2 slicers for the Variable, so I can choose 2 products from the product list and to calculate each price, multiplied by the selected Variable value. This 2 groups are not Interacted(I have swithed off the Interactions between them with Format>Edit Interactions), so I can choose values from the same table on one page independently.
To this moment everything works fine, but i want to sum both calculated prices. How I can do this in PowerBI?
Thanks in advance!
BR
Solved! Go to Solution.
The product of sum needs a row context. Try like
Calculated_Price = calculate(MAX(Table_1[Unit_Price])*MAX('Variables_Table '[Value]),Table_1[product])
Calculated_Price = sumX(summarize(Table_1,,Table_1[product],"_max",MAX(Table_1[Unit_Price])*MAX('Variables_Table '[Value])),[_max])
Hey @Anonymous
What you need if a formula that uses your slicer value. See this thread: https://community.powerbi.com/t5/Desktop/Passing-Slicer-Value-into-Calculated-Formula-to-display-the/td-p/373218
All you have to do is create a measure that uses the guidelines in the thread above to find your slicer value for each slicer and then plug your calculated price into the formula using the slicer value as your FILTER instead of MAX for each slicer and then add the two together.
The product of sum needs a row context. Try like
Calculated_Price = calculate(MAX(Table_1[Unit_Price])*MAX('Variables_Table '[Value]),Table_1[product])
Calculated_Price = sumX(summarize(Table_1,,Table_1[product],"_max",MAX(Table_1[Unit_Price])*MAX('Variables_Table '[Value])),[_max])
Can you explain me what are these - measures or calculated column? I tried them bu no success. Maybe I'm doing something wrong 😞
Calculated_Price = calculate(MAX(Table_1[Unit_Price])*MAX('Variables_Table '[Value]),Table_1[product])
Calculated_Price = sumX(summarize(Table_1,,Table_1[product],"_max",MAX(Table_1[Unit_Price])*MAX('Variables_Table '[Value])),[_max])
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 |
---|---|
109 | |
97 | |
80 | |
67 | |
60 |
User | Count |
---|---|
148 | |
113 | |
97 | |
84 | |
67 |