Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
I have a table with two years of revenue for vendors that sell multiple products. I'm trying to determine max and min values for both a column and a calculated measure that are dynamically filtered, but I'm running into issues with both. The column measure retrieves the max and min values across products for only the current vendor even when I apply ALL to vendors.
maxRevenue = CALCULATE(MAX([Vendor YoY]), ALL('Vendor Performance'[Vendors]), ALL('Vendor Performance'[Product]))
With the measure, the error I get is "The MAX function only accepts a column reference as the argument number 1."
I need to do the following. To be clear, I only need help with step 2:
Rank the selected vendors based on the distance metric
Here's a link to my sample .pbix file.
Any help is very much appreciated!
Solved! Go to Solution.
There was something about this problem that seemed familiar. Sure enough, when I searched my past posts I found another instance where I needed to dynamically calculate the maximum value of a matrix. The solution for that ultimately was the same as for this. To normalize revenue across vendors, I did the following:
Revenue Normalized =
VAR vendorRev = SUM(Sales[Revenue])
VAR maxRev = MAXX(ALLSELECTED(Sales[Vendor]), vendorRev)
VAR minRev = MINX(ALLSELECTED(Sales[Vendor]), vendorRev)
VAR normalizedRev = DIVIDE(vendorRev - minRev, maxRev - minRev, BLANK())
RETURN
normalizedRevRather than using the VAR, I could have used a separate measure built with the same formula.
There was something about this problem that seemed familiar. Sure enough, when I searched my past posts I found another instance where I needed to dynamically calculate the maximum value of a matrix. The solution for that ultimately was the same as for this. To normalize revenue across vendors, I did the following:
Revenue Normalized =
VAR vendorRev = SUM(Sales[Revenue])
VAR maxRev = MAXX(ALLSELECTED(Sales[Vendor]), vendorRev)
VAR minRev = MINX(ALLSELECTED(Sales[Vendor]), vendorRev)
VAR normalizedRev = DIVIDE(vendorRev - minRev, maxRev - minRev, BLANK())
RETURN
normalizedRevRather than using the VAR, I could have used a separate measure built with the same formula.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 3 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 11 | |
| 9 | |
| 8 | |
| 6 | |
| 6 |