Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
daniel_bernal_y
Contributor III
Contributor III

Value & Max(Aggr(Value))

Hi there,

I want to obtain something like this: "White colour: 85%",

where White colour appears 85% times from total in the table.

I'm using Max(Aggr()) to obtain 85% value into a TEXT OBJECT, but... How can I get the value "White colour" from the table?

Theres only six colours in the table. White colour has more appearances.

Thanks in advance!

1 Solution

Accepted Solutions
zoltann14
Contributor II
Contributor II

Hi,

You can use the FirstSortedValue() function, for example something like this:

=FirstSortedValue(P2_2,-aggr(Count(P2_2),P2_2)) &' : '&

NUM(Max(aggr(Count(P2_2),P2_2))/Count(Total P2_2),'#0,00%')

View solution in original post

5 Replies
neelamsaroha157
Specialist II
Specialist II

Can you share a sample file.

daniel_bernal_y
Contributor III
Contributor III
Author

Sure I can.

Please replace "White colour" by "Todos los días" (All days), and the biggest % is equal to sum "Satisfecho" and "Muy satisfecho" values from total.

So, the only line that I want get is: "Todos los días: 85%"

Obs.: 85% is not the true value.

Thanks!

neelamsaroha157
Specialist II
Specialist II

You can achieve the same results using a table. Check out the attachment.

daniel_bernal_y
Contributor III
Contributor III
Author

I know that I can using a table, but is not the format required. The format required is a single line with 2 records separate by ":", like this: "White colour: 85%".

I'm using a Text object, and I can't get "White colour" text, just 85% using Max(Aggr()).

I don't know if I can explain myself or is very difficult to develop.

Note: I can't open you qvw file because licence issue

Thanks again.

zoltann14
Contributor II
Contributor II

Hi,

You can use the FirstSortedValue() function, for example something like this:

=FirstSortedValue(P2_2,-aggr(Count(P2_2),P2_2)) &' : '&

NUM(Max(aggr(Count(P2_2),P2_2))/Count(Total P2_2),'#0,00%')

View solution in original post