March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hello Team, I have a problem to calculate the Index Price or calculate (divide) al Column_Value/ Select_Product_Value (same column in this case Price).
What is your suggest to Select the produc with Slicer (Producto_Base) and calculate the Index Column (rest of the price products)
Solved! Go to Solution.
Here is one way. Set up the model with a dimension table (recommended) and an independent table for product (you will be using this independent product table for the slicer). The model looks like this:
Set up the table visual using the field from the Product table; the slicer from the 'Select Product' table.
Then these measures:
Price =
DIVIDE(SUM(fTable[Venta]), SUM(fTable[Unidades]))
and
Index =
VAR _Selected =
CALCULATE (
[Price],
FILTER (
ALL ( 'Product Table' ),
'Product Table'[dProducto] = SELECTEDVALUE ( 'Select Product'[Producto Sel] )
)
)
RETURN
DIVIDE ( [Price], _Selected )
and you will get
sample pbix file attached
Proud to be a Super User!
Paul on Linkedin.
WOW Excellent!!!
Rock Star!
Here is one way. Set up the model with a dimension table (recommended) and an independent table for product (you will be using this independent product table for the slicer). The model looks like this:
Set up the table visual using the field from the Product table; the slicer from the 'Select Product' table.
Then these measures:
Price =
DIVIDE(SUM(fTable[Venta]), SUM(fTable[Unidades]))
and
Index =
VAR _Selected =
CALCULATE (
[Price],
FILTER (
ALL ( 'Product Table' ),
'Product Table'[dProducto] = SELECTEDVALUE ( 'Select Product'[Producto Sel] )
)
)
RETURN
DIVIDE ( [Price], _Selected )
and you will get
sample pbix file attached
Proud to be a Super User!
Paul on Linkedin.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
134 | |
91 | |
89 | |
64 | |
58 |
User | Count |
---|---|
201 | |
137 | |
107 | |
72 | |
68 |