Forum Discussion
Evaluate Measure in Calculated Column with Disconnected Table
- 5 years ago
Hi Anonymous ,
I create a table: SlicerValue
Column1 1 2 0 And a Calculate Table:
Calculate Table = CROSSJOIN( DISTINCT('Table'[Period]), SlicerValue )Then create measure and filter Column1 field by Measure.
Measure = var currentyear = SELECTEDVALUE('Year Filter'[Year Filter]) var selection = IF(currentyear = 2020, 1, IF(currentyear = 2021, 2, 0)) return IF( MAX('Calculate Table'[Column1]) = selection, 1 )If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
WinnizIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous ,
What data do you want to filter by measure Selection validation?
The values in calculated column cannot change with the value of slicer. Please share sample data that don't contain sensitive data and expected output, maybe we can do it in a different way.
Best Regards,
Winniz
Hello,
I have a disconnected table, with 2 values: 2020, 2021.
I need to use these 2 values in a slicer to filter the periods table based on some logic.
If i put the logic in a measure, it works.
If i put the logic in a calculated column, it does not work. Simplified logic can be see in the picture above.
Given the fact that it works with the measure, i want to make my calculated column = measure.
Currently i do not have a sample data file.
Thank you
- v-kkf-msft5 years ago
Community Support
Hi Anonymous ,
I create a table: SlicerValue
Column1 1 2 0 And a Calculate Table:
Calculate Table = CROSSJOIN( DISTINCT('Table'[Period]), SlicerValue )Then create measure and filter Column1 field by Measure.
Measure = var currentyear = SELECTEDVALUE('Year Filter'[Year Filter]) var selection = IF(currentyear = 2020, 1, IF(currentyear = 2021, 2, 0)) return IF( MAX('Calculate Table'[Column1]) = selection, 1 )If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
WinnizIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous5 years agoNot applicable
This appears to solve my issue. Thank you all for your help