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!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
I am trying to get the highlighted final project risk rating for each Vendor and Product service based on maximum project ID. (highlighted rows).
I have below calculation but I get error on using Max(). Project_ID_Calc is a calculated field I created by removing the String from Project ID and converting it to whole number.
Flag = CALCULATE(MIN('Table1'[FINAL_PROJECT_RISK_RATING]), ALLEXCEPT('Table1','Table1'[VENDOR_ID],'Table1'[PRODUCT_SERVICE]),'Table1'[PROJECT_ID] = MAX('Table1'[PROJECT_ID_CALC]) )
Any help is much appreciated.
Thanks,
Solved! Go to Solution.
you can create a column
Column =
VAR _max=CALCULATE(max('Table'[PROJECT_ID]),ALLEXCEPT('Table','Table'[VENDOR_ID],'Table'[PRODUCT_SERVICE]))
return maxx(FILTER('Table','Table'[VENDOR_ID]=EARLIER('Table'[VENDOR_ID])&&'Table'[PROJECT_ID]=_max),'Table'[FINAL_PROJECT_RISK_RATING])
or a measure
measure =
VAR _max=CALCULATE(max('Table'[PROJECT_ID]),ALLEXCEPT('Table','Table'[VENDOR_ID],'Table'[PRODUCT_SERVICE]))
return maxx(FILTER(all('Table'),'Table'[VENDOR_ID]=max('Table'[VENDOR_ID])&&'Table'[PROJECT_ID]=_max),'Table'[FINAL_PROJECT_RISK_RATING])
Proud to be a Super User!
Thanks, this was helpful, however, I would like to get the final project risk rating for that condition. I am trying to get this flag:
Again, any help is much appreciated.
| VENDOR_ID | PRODUCT_SERVICE | PROJECT_ID | FINAL_PROJECT_RISK_RATING | Flag |
| Vend-0031 | ABC | TP-234 | Above level | Above level |
| Vend-0031 | ABC | TP-235 | Needs Improvement | Above level |
| Vend-0031 | ABC | TP-236 | Needs Improvement | Above level |
| Vend-0031 | ABC | TP-237 | Needs Improvement | Above level |
| Vend-0031 | ABC | TP-238 | Above level | Above level |
| Vend-0031 | DEF | TP-1245 | Needs Improvement | Above level |
| Vend-0031 | DEF | TP-1256 | Above level | Above level |
| Vend-0031 | DEF | TP-1247 | Needs Improvement | Above level |
| Vend-0031 | DEF | TP-1248 | Above level | Above level |
you can create a column
Column =
VAR _max=CALCULATE(max('Table'[PROJECT_ID]),ALLEXCEPT('Table','Table'[VENDOR_ID],'Table'[PRODUCT_SERVICE]))
return maxx(FILTER('Table','Table'[VENDOR_ID]=EARLIER('Table'[VENDOR_ID])&&'Table'[PROJECT_ID]=_max),'Table'[FINAL_PROJECT_RISK_RATING])
or a measure
measure =
VAR _max=CALCULATE(max('Table'[PROJECT_ID]),ALLEXCEPT('Table','Table'[VENDOR_ID],'Table'[PRODUCT_SERVICE]))
return maxx(FILTER(all('Table'),'Table'[VENDOR_ID]=max('Table'[VENDOR_ID])&&'Table'[PROJECT_ID]=_max),'Table'[FINAL_PROJECT_RISK_RATING])
Proud to be a Super User!
here is a workaround for you.
Measure = IF(CALCULATE(MAX('Table'[ProjectID]),ALLEXCEPT('Table','Table'[Vendor_ID],'Table'[Product]))=MAX('Table'[ProjectID]),1,0)
then set up conditional formatting to change the color
pls see the attachment below
Proud to be a Super User!
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 61 | |
| 54 | |
| 41 | |
| 17 | |
| 13 |
| User | Count |
|---|---|
| 106 | |
| 99 | |
| 38 | |
| 29 | |
| 28 |