Forum Discussion
Create Calculated Column based on filter Selection
- Anonymous3 years ago
Hi vengadesh_p ,
Please update the formula of measure [00_Category] as below and check if it can return the correct result. Please find the details in the attachment.
00_Category = VAR _age = [00_Age] RETURN MAXX ( FILTER ( 'Age Category', 'Age Category'[Age] = _age ), [Category] )Best Regards
Hi Anonymous
This Is My datamodel , I have connection Age Category to Dim Calendar table by using Age Field
This Age field want to calculate based on Refernce Year parameter
Example : i selected 2020 so Age field want to change based on 2020 & based on Age field i want to show data from Age Category Table
Note: Currently i have achived this logic by static Value (_Selected Year = 2020) this selected year value want to change dynamically by reference year selection
I have attached Sample Pbix File
Thanks
vengadesh
Hi vengadesh_p ,
I updated your sample pbix file(see attachment), please check if that is what you want. You can create three measues as below to get it:
00_IsFuture =
IF (
SELECTEDVALUE ( 'Dim_Calendar'[Year] ) <= [_Reference Year Value],
"Actual",
"Future"
)00_Age =
IF (
SELECTEDVALUE ( Dim_Calendar[Year] ) > [_Reference Year Value],
0,
[_Reference Year Value] - SELECTEDVALUE ( 'Dim_Calendar'[Year] )
)00_Category =
MAXX ( FILTER ( 'Age Category', 'Age Category'[Age] = [00_Age] ), [Category] )
Best Regards
- vengadesh_p3 years ago
Helper II
Anonymous
00_Category was not working if i select 2019 or 2018.. etc00_Category = MAXX ( FILTER ( 'Age Category', 'Age Category'[Age] = [00_Age] ), [Category] )
- Anonymous3 years agoNot applicable
Hi vengadesh_p ,
Please update the formula of measure [00_Category] as below and check if it can return the correct result. Please find the details in the attachment.
00_Category = VAR _age = [00_Age] RETURN MAXX ( FILTER ( 'Age Category', 'Age Category'[Age] = _age ), [Category] )Best Regards