Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have set of value.
I need to take max value as 100% other values need to take wrt max value in percentage
please suggest
Thanks
You can calculate the maximum value per dimension using a group by clause, then join the max value back to the fact table, then calculate the percentage in a resident load (or in front end).
DATA:
LOAD * INLINE [
Dim, Value
1, 10
1, 20
1, 5
];
LEFT JOIN (DATA)
LOAD
Dim,
MAX(Value) as MaxValue
RESIDENT DATA
GROUP BY Dim;
RESULT:
LOAD *,
num(Value / MaxValue,'#.00%','.',',') as Percentage
RESIDENT DATA;
DROP TABLE DATA;
In a chart, try
=Value / Max(Total Value)
assuming there is only one Value per dimension.
Hi,
Try the following.
PFA
Thanks Swehi,
But I have around 10-12 value for each dimension, I need to calculate max value for each and calculate percentile value with respect to max value.
Can you please suggest how shall i go ahead for making those calculations at back end.
Thanks
You can calculate the maximum value per dimension using a group by clause, then join the max value back to the fact table, then calculate the percentage in a resident load (or in front end).
DATA:
LOAD * INLINE [
Dim, Value
1, 10
1, 20
1, 5
];
LEFT JOIN (DATA)
LOAD
Dim,
MAX(Value) as MaxValue
RESIDENT DATA
GROUP BY Dim;
RESULT:
LOAD *,
num(Value / MaxValue,'#.00%','.',',') as Percentage
RESIDENT DATA;
DROP TABLE DATA;
thanks Swehi