Forum Discussion
ahumke
Helper I
7 years agoDAX table syntax to select max year and associated values within categories
I'm trying to create a new table using DAX that will select the max year and an associated value (KPI weighted score component) of that year within three categories. (area, program title, and KPI me...
- 7 years ago
Hi ahumke ,
Make a little modification to above DAX formula.
ProgramSummary = ADDCOLUMNS ( GROUPBY ( 'SummaryKPI', 'SummaryKPI'[Area], 'SummaryKPI'[Program Title], 'SummaryKPI'[KPI Metric], "MAXYear", MAXX ( CURRENTGROUP (), 'SummaryKPI'[JanuaryDate] ) ), "Score", LOOKUPVALUE ( SummaryKPI[KPI Weighted Score Component], SummaryKPI[Area], [Area], SummaryKPI[Program Title], [Program Title], SummaryKPI[KPI Metric], [KPI Metric], SummaryKPI[JanuaryDate].[Date], [MAXYear] ) )Best regards,
Yuliana Gu
v-yulgu-msft
Microsoft Employee
7 years agoHi ahumke ,
Make a little modification to above DAX formula.
ProgramSummary =
ADDCOLUMNS (
GROUPBY (
'SummaryKPI',
'SummaryKPI'[Area],
'SummaryKPI'[Program Title],
'SummaryKPI'[KPI Metric],
"MAXYear", MAXX ( CURRENTGROUP (), 'SummaryKPI'[JanuaryDate] )
),
"Score", LOOKUPVALUE (
SummaryKPI[KPI Weighted Score Component],
SummaryKPI[Area], [Area],
SummaryKPI[Program Title], [Program Title],
SummaryKPI[KPI Metric], [KPI Metric],
SummaryKPI[JanuaryDate].[Date], [MAXYear]
)
)
Best regards,
Yuliana Gu
- ahumke7 years ago
Helper I
Thank you! that worked perfectly!