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
Hi,
I have the table below and would like the have a column to return the first occurrence of the highest sum.
ID | Date | sum |
A | 12/1/2021 | 500 |
A | 1/1/2022 | 100 |
A | 2/1/2022 | 5 |
B | 1/1/2022 | 120 |
B | 2/1/2022 | 100 |
C | 1/1/2019 | 20 |
C | 6/1/2020 | 20 |
C | 12/1/2021 | 20 |
This table is what I would want. Notice that for ID 'C', even though the sum is the same for the three dates, I just want to show the first time that occurred :
ID | Date | sum | First Date of Max sum |
A | 12/1/2021 | 500 | 12/1/2021 |
A | 1/1/2022 | 100 | 12/1/2021 |
A | 2/1/2022 | 5 | 12/1/2021 |
B | 1/1/2022 | 120 | 1/1/2022 |
B | 2/1/2022 | 100 | 1/1/2022 |
C | 1/1/2019 | 20 | 1/1/2019 |
C | 6/1/2020 | 20 | 1/1/2019 |
C | 12/1/2021 | 20 | 1/1/2019 |
I tried the following but it just returns 12/1/21 (highest value in table).
=CALCULATE(MIN([Date]),FILTER('new table',[sum]=MAX([sum]) && [ID]=[ID]))
Is there another way to add in that the ID column should be whatever ID is in that row?
Solved! Go to Solution.
Try:
1) Sum value = SUM(Table[sum])
2) First Date of Max Sum =
VAR _MX = MAXX(ALLEXCEPT (Table, Table [ID]), [Sum value])
RETURN
CALCULATE(MIN(Table[Date]), FILTER(ALLEXCEPT (Table, Table [ID]), [Sum Value] = _MX))
Proud to be a Super User!
Paul on Linkedin.
Hi @loafers,
Did the above suggestion help with your scenario? if that is the case, you can consider Kudo or accept it to help others who faced similar requirements.
If these also don't help, please share more detailed information to help us clarify your scenario to test.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
Try:
1) Sum value = SUM(Table[sum])
2) First Date of Max Sum =
VAR _MX = MAXX(ALLEXCEPT (Table, Table [ID]), [Sum value])
RETURN
CALCULATE(MIN(Table[Date]), FILTER(ALLEXCEPT (Table, Table [ID]), [Sum Value] = _MX))
Proud to be a Super User!
Paul on Linkedin.
User | Count |
---|---|
65 | |
60 | |
47 | |
33 | |
32 |
User | Count |
---|---|
86 | |
75 | |
56 | |
50 | |
45 |