Forum Discussion
awarriorpoet
Helper I
2 years agoCalculate Value with a measured quantity based on different types
Need help figuring out how to create a measure and show in a visual based on multiplying a measure (Shortage) with a lookup of three different options based on "SIZE". Use Case: We sold more contain...
awarriorpoet
Helper I
2 years agoThank you, this is exactly what I was trying to do. I simplified the shortage measure and created three measures to be used in the visuals, however, I am getting an error on the "option" measurements.
Here is what I did:
1. I created a table (below) using the "Enter Data" function
2. I created a relationship to the sales data table to this table in a Many:1 relationship via the "FAMILY" field.
3. Created the option Measures in the sales table (Table 1)
Error: "The column 'tblSWPricing[OPTION_E]' either doesn't exist or doesn't have a relationship to any table available in the current context."
| FAMILY | OPTION_E | OPTION_A | OPTION_P |
| SIZE A | 10.26 | 18.46 | 21.96 |
| SIZE B | 10.87 | 21.75 | 31.03 |
| SIZE C | 12.08 | 29 | 41.35 |
| SIZE D | 10.87 | 21.75 | 31.03 |
| SIZE E | 12.08 | 29 | 41.35 |
| SIZE F | 2.26 | 3.4 | 4.88 |
| SIZE G | 6.8 | 8.44 | 11.59 |
| SIZE H | 11.28 | 18.46 | 21.96 |
awarriorpoet
Helper I
2 years agoI created a measure that seems to be working. I could not get RELATE() to work.
OPTION_P_$ = Table1[Shortage] *
LASTNONBLANK(
SELECTCOLUMNS(
RELATEDTABLE(tblSWPricing),
"OPTION_P",tblSWPricing[OPTION_P]),
1)