Forum Discussion
New Column creation based on filtered Measure
- 2 years ago
output :
if i understood correcrtly, you created a measure = (price+Variance)/price with calculate to filter on category 1 and range 1 .
then you are using this measure in a calculated column to multiply it with price .
if that so,
let me help you :
create a calculated column as follow :
Column = var datasource= FILTER( 'Table (2)', 'Table (2)'[category] = "Category1" && 'Table (2)'[range] = 1 ) var price =SELECTCOLUMNS(datasource, 'Table (2)'[Price]) var vriance = SELECTCOLUMNS(datasource, 'Table (2)'[Variance]) var res = (price+ vriance)/price return res * 'Table (2)'[Price]If my answer helped sort things out for you, i would appreciate a thumbs up 👍 and mark it as the solution !✅
It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🤠
output :
if i understood correcrtly, you created a measure = (price+Variance)/price with calculate to filter on category 1 and range 1 .
then you are using this measure in a calculated column to multiply it with price .
if that so,
let me help you :
create a calculated column as follow :
Column =
var datasource=
FILTER(
'Table (2)',
'Table (2)'[category] = "Category1" && 'Table (2)'[range] = 1
)
var price =SELECTCOLUMNS(datasource, 'Table (2)'[Price])
var vriance = SELECTCOLUMNS(datasource, 'Table (2)'[Variance])
var res = (price+ vriance)/price
return res * 'Table (2)'[Price]
If my answer helped sort things out for you, i would appreciate a thumbs up 👍 and mark it as the solution !✅
It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🤠
Hi
This solve the problem of showing the value in all rows but the filtering does not work it calculates the res value using all the rows in the table.
Thank you!