Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone!
Let's say I have a table that looks like the result below.
ID | Maximum Value | Amount |
Unique1 | 5 | $6 |
Unique1 | 1 | $5 |
Unique2 | 1 | $3 |
Unique2 | 4 | $1 |
But, I want to create a dimension or measure that looks at all the values in the "Maximum Value" column, and only use that value based on the unique ID... Thus making the table look like the output below.
ID | Maximum Value | Amount |
Unique1 | 5 | $6 |
Unique1 | 5 | $5 |
Unique2 | 4 | $3 |
Unique2 | 4 | $1 |
I tried using Aggr(max(Maximum Value), ID) but this didn't work, I also tried FirstSortedValue, and this did not work either... Does anyone have any ideas?
Thank you!
This works if you got amount as dimension, do you need to use aggregation for amount value with your actual data?
Max(Total<ID>[Maximum Value])
This works if you got amount as dimension, do you need to use aggregation for amount value with your actual data?
Max(Total<ID>[Maximum Value])
Thank you so much! This is exactly what I needed!
@NaWhite72 You can also solve the same in the Script level itself.
NoConcatenate
Temp:
Load * inline [
ID,Value, Amount
Unique1, 5, $6
Unique1, 1, $5
Unique2, 1, $3
Unique2, 4, $1
];
left join (Temp)
Max_Value:
Load ID, Max(Value) as Max_Value
Resident Temp
Group by ID;
Drop field Value from Temp;
Exit Script;