Forum Discussion
Dynamic columns with filters
Hello everyone.
I have the following dilema. Supose we have the age of 3 people (A with 8 years, B with 9 years and C with 10 years) in 2020. I have a filter that selects a year from 2020 until 2040. Is there any way to get the age of the people from the filter?
For example:
2020 2040
8 28
9 29
10 30
Thank you
7 Replies
- parry2k
Super User
bernardoamaral may be try something like this
Age in the future year = VAR __numberofYears = MAX ( Table[Year] ) - MIN ( Table[Year] ) RETURN MAX ( Table[Age] ) + __numberofYearsyou can tweak above measure based on your model.
- bernardoamaralFrequent Visitor
parry2k thank you for the response, but that is not what I'm looking for.
That works for the year 2040, but I want something dynamic. What I mean by that is that, with a filter, the user selects the year he wants. If, for example, the user selects 2040, it should appear:
But if he selects 2030 it should appear
- bernardoamaralFrequent Visitor
(Conclusion from last post)
- v-frfei-msft
Community Support
Hi bernardoamaral ,
We cannot create dynamic calculated column in power bi. You can create measure and add it to visuals to work around.
- AnonymousNot applicable
I'm not sure if you got the solution or not, But if your are not, Follow these steps :
Make a MEASURE
Age in the future year = VAR __numberofYears = MAX ( Table[Year] ) - MIN ( Table[Year] ) RETURN MAX ( Table[Age] ) + __numberofYearsNOTE :PLEASE DO NOT MAKE NEW COLUMN
Regards,
Gaurav Raj Singh