Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
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.
User | Count |
---|---|
12 | |
11 | |
8 | |
6 | |
5 |
User | Count |
---|---|
25 | |
19 | |
14 | |
10 | |
7 |