Forum Discussion
Maximum values across two tables
- 6 years ago
Anonymous , not very clear. see if this measure can help
MyAttempt = maxx(SUMMARIZE('Table1',Table1[ID],"Max1",MAX('Table1'[Score]),"Max2",MAX('Table2'[Max Score])),max([Max1],[Max2]))
Anonymous , not very clear. see if this measure can help
MyAttempt = maxx(SUMMARIZE('Table1',Table1[ID],"Max1",MAX('Table1'[Score]),"Max2",MAX('Table2'[Max Score])),max([Max1],[Max2]))
- Anonymous6 years agoNot applicable
Thanks for the pointers Greg_Deckler!
I got here from the link from the help ribbon in Power BI and had never seen those posts. The scenarios and and excel comparisons didn't provide a solution this time, nor my searches in the Forum, but they will definitely help me in the future.
Here's a graphic showing where I'd got to:
Example
The source data itself:
Table 1 Table 2 ID Score ID Max Score 1 12 1 5 1 14 2 23 2 21 3 31 3 31 and I used the DAX expression
MyAttempt = SUMMARIZE('Table1',Table1[ID],"Max1",MAX('Table1'[Score]),"Max2",MAX('Table2'[Max Score]))
to get the table shown above, but I'm trying to get a column "TargetMax" as below:
ID Max1 Max2 TargetMax 1 14 5 14 2 21 23 23 3 31 31 31 - Anonymous6 years agoNot applicable
Thanks amitchandak
I wasn't sure how to add it as a measure, but copy/pasting it into the definition of my table I received an error "The expression specified in the query is not a valid table expression". I provided more details on my question as suggested by Greg.
- Anonymous6 years agoNot applicable
Thanks again amitchandak - I hadn't understood how to use your solution, but persevered and it's working now 🙂