Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Solved! Go to Solution.
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
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
Thank you! that worked perfectly!
I'm not an expert in the GROUPBY function but it does look like any reference to CURRENTGROUP relates to the group created before you start using the CURRENTGROUP() function. There may be a way to say 'get me the field next to the max [January Date]' but I don't know how to do that.
However, it looks like you could create a calculated column and use LOOKUPVALUE e.g.
Column1 = LOOKUPVALUE(SummaryKPI[KPI Weighted Score Component], SummaryKPI[Area], ProgramSummary[SummaryKPI_Area], SummaryKPI[Program Title], ProgramSummary[SummaryKPI_Program Title], SummaryKPI[KPI Metric], ProgramSummary[SummaryKPI_KPI Metric], SummaryKPI[JanuaryDate], ProgramSummary[MAXYear] )
I am getting an error on that formula that "A single value for column 'summaryKPI_Area' cannot be determined. While using that code...
OK, you are going to have to debug this.
I used the data you provided. I used 'Get Data' to pull the data from Excel. I ran the DAX to create the ProgramSummary table. I then created the new column (with the LOOKUPVALUE code) in the ProgramSummary table.
So at your side, something different is happening. Let me know what you find.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
96 | |
92 | |
81 | |
70 | |
64 |
User | Count |
---|---|
115 | |
106 | |
96 | |
81 | |
72 |