Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
deepakqlikview_123
Specialist
Specialist

treating max value as 100%

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

1 Solution

Accepted Solutions
swuehl
MVP
MVP

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;

View solution in original post

5 Replies
swuehl
MVP
MVP

In a chart, try

=Value / Max(Total Value)

assuming there is only one Value per dimension.

Not applicable

Hi,

Try the following.

PFA

deepakqlikview_123
Specialist
Specialist
Author

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

swuehl
MVP
MVP

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;

deepakqlikview_123
Specialist
Specialist
Author

thanks Swehi