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 dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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
normalizedRev
Rather 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
normalizedRev
Rather than using the VAR, I could have used a separate measure built with the same formula.
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
9 | |
7 | |
6 | |
6 |
User | Count |
---|---|
28 | |
11 | |
11 | |
10 | |
6 |