Forum Discussion
Using measures based on filtered data in a calculated column
- 8 years ago
Hi colec6 ,
These's no filter condition in your measure so you can simply use this pattern:
Subtraction_measure = MINX ( TABLE1, TABLE1[Value] ) - [Average_To_Subtract]
Regards,
Jimmy Tao
Hi colec6,
Two points should be checked.
"This calculates fine and shows the correct values in cards etc but when I try to create a column where I subtract this value from the existing value in table 1 I get the error : A table of multiple values was supplied where a single value was expected. "
<-- Could you post your "Substraction Measure"?
"If I remove the filtering term and simply subtract a simple measure like measure = AVERAGE(TABLE2[VALUE]) then the calculation works fine but the value is wrong "
<-- What's your expected result?
Regards,
Jimmy Tao
Jimmy,
Thanks for your reply here. The subtraction is not a measure. Rather I took the average measure as posted in the original thread and used it in to calculate a column value where I take the average value measure as calculated from the second table and then subtract it from the value column in the first table - simply TABLE1[Value] - Average_to_subtract.
The expected result is as shown in the blue column in the dummy data. I.e. I calculate an average measure based off of a filtered selection in table 2 and then subtract this value from all the values in Table1[Value] column.
Chris