Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello
I have the data:
A, 01/01/20, X1
A, 02/01/20, X2
A, 01/01/20, X3
A, 02/01/20, X4
B, 01/01/20, X5
B, 02/01/20, X6
B, 01/01/20, X7
...
I want to get the X value which corresponds to the maximum date for each of the A and B.
Any idea please?
Solved! Go to Solution.
Hi @Anonymous ,
Here the sample data:
Then you can use the following measure:
Measure = VAR A = CALCULATE(MAX('Table'[Column2]),ALLEXCEPT('Table','Table'[Column1])) RETURN CALCULATE(CONCATENATEX('Table','Table'[Column3],","),'Table'[Column2] =A)
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
@Anonymous , Try a measure like
calculate(sum(Table[col 3]), filter(Table, Table[Date] = calculate(max(Table[date]), allexcept(Table, Table[col 1]))))
@amitchandak I cannot make any sense of what you wrote, can you explain step by step please?
Hi @Anonymous ,
Here the sample data:
Then you can use the following measure:
Measure = VAR A = CALCULATE(MAX('Table'[Column2]),ALLEXCEPT('Table','Table'[Column1])) RETURN CALCULATE(CONCATENATEX('Table','Table'[Column3],","),'Table'[Column2] =A)
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
@Anonymous , I do not see any column name,
So the columns are col1, date, col3
so you can try max of col3 on max of date on allexpect col 1
calculate(maxTable[col 3]), filter(Table, Table[Date] = calculate(max(Table[date]), allexcept(Table, Table[col 1]))))
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
67 | |
65 | |
56 | |
39 | |
27 |
User | Count |
---|---|
85 | |
59 | |
45 | |
43 | |
38 |