Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi community,
I need your help with a little dax. I'm trying to get the right value based on the result from another column.
I have a table that generally summarizes project budgets, table has number of lines per projects with different version id's.
I will only be using 3 specific ones for my condition - in this example A1,B1,C1.
I want a statement to return me values from the latest version id.
I though a simple nested if would do the job but it just sums all values regardles of it being A1 or B1.
This is my sample data:
| Project | Version ID | Value |
| Project A | A1 | 150,000 |
| Project A | B1 | 174,500 |
| Project B | A1 | 88,500 |
| Project B | B1 | 120,00 |
| Project B | C1 | 135,200 |
| Project A | C1 | 201,500 |
| Project C | A1 | 50,000 |
| Project C | B1 | 68,000 |
So from above table desired result would be:
Project A - 201,500
Project B - 135,500
Project C - 68,000
Can anyone help? This seems simple enough but I just cannot get it.
Thanks
Solved! Go to Solution.
@kasiaw29 , Create a measure like
measure = calculate(sum(Table[Value]), filter(Table,Table[ Version ID] = calculate(max(Table[Version ID]), allexpcept(Table,table[Project]))))
@kasiaw29 , Create a measure like
measure = calculate(sum(Table[Value]), filter(Table,Table[ Version ID] = calculate(max(Table[Version ID]), allexpcept(Table,table[Project]))))
Hey,
Thanks for this! I had to rank my version id's as apart from the ones that needed to be considered I had others as well that were not to be counterd, but your solution worked for me.
Thanks so much!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 43 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |