Forum Discussion
create a table for price difference
- 1 year ago
Anonymous , Try using
Step 1: Load Data
Load your data into Power BI. You should have two tables: Table1 and Table2.Step 2: Create Relationships
Ensure there is a relationship between Table1[Reference] and Table2[Reference].Step 3: Create Calculated Columns
In Table1, create the following calculated columns:ATA Mapping Model Column:
ATA Mapping Model =
LOOKUPVALUE(
Table2[ATA mapping model],
Table2[Reference], Table1[Reference]
)
ATA Price Column:ATA Price =
LOOKUPVALUE(
Table1[Price],
Table1[Reference], Table1[ATA Mapping Model]
)
Step 4: Create the Measure for ATA Price Difference
Create a measure to calculate the ATA price difference:ATA Price Difference Measure:
ATA Price Difference =
DIVIDE(
MAX(Table1[ATA Price]),
MAX(Table1[Price])
)
Step 5: Create the Visual
Add a table visual to your report.
Add the Prefix column from Table2 and the ATA Price Difference measure to the table visual.
Apply a filter to the visual to show only rows where Retailer is "H&M".
Anonymous , Try using
Step 1: Load Data
Load your data into Power BI. You should have two tables: Table1 and Table2.
Step 2: Create Relationships
Ensure there is a relationship between Table1[Reference] and Table2[Reference].
Step 3: Create Calculated Columns
In Table1, create the following calculated columns:
ATA Mapping Model Column:
ATA Mapping Model =
LOOKUPVALUE(
Table2[ATA mapping model],
Table2[Reference], Table1[Reference]
)
ATA Price Column:
ATA Price =
LOOKUPVALUE(
Table1[Price],
Table1[Reference], Table1[ATA Mapping Model]
)
Step 4: Create the Measure for ATA Price Difference
Create a measure to calculate the ATA price difference:
ATA Price Difference Measure:
ATA Price Difference =
DIVIDE(
MAX(Table1[ATA Price]),
MAX(Table1[Price])
)
Step 5: Create the Visual
Add a table visual to your report.
Add the Prefix column from Table2 and the ATA Price Difference measure to the table visual.
Apply a filter to the visual to show only rows where Retailer is "H&M".