Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
rcandeo
Creator III
Creator III

How to make rank() works in a text field

I have a table that shows informations for a client like this:

Client     John Denver

Rank               5

Sales          $5,500

Growth          35%

But I need to put this infornation separetelly. So each one will be in a text field.

The problem is that the second line where I have the Rank information, it does not worl as Rank is made to work only in tables.

How can I show this rank information please?

The expression is this:

=rank(sum({1<[Reporting Calendar Year]={'$(vSelectedYear)'},[Reporting Calendar Quarter]={'$(vSelectedQuarter)'},[Client]={'$(vSelectedClient)'}>} $(vCurrency))) * avg(1)

18 Replies
rcandeo
Creator III
Creator III
Author

Yes, thank you so much

rcandeo
Creator III
Creator III
Author

Another question please. This expression is fixed in selections.

If I change "Sum({1" to "Sum({$" to use any selections that I put in the report, it stops working.

How can I make this flexible please?

sunny_talwar

May be this, if you only wish to ignore selection in Brocker Group Name field:

=Aggr(Rank(Sum({$<[Reporting Calendar Year]={'$(vSelectedYear)'}, [Reporting Calendar Quarter]={'$(vSelectedQuarter)'}, [Broker Group Name]>} $(vCurrency))) * Avg(1), [Broker Group Name])

rcandeo
Creator III
Creator III
Author

Thank you again So Much.

I didn´t notice that I had to put  "[Broker Group Name]>" with no selections inside the expressions

sunny_talwar

That just mean that ignore selection in [Broker Group Name] and is equivalent of [Broker Group Name] =

rcandeo
Creator III
Creator III
Author

Sorry asking you again today. But I am trying to put this rank information in a line chart for all the years, but considering that year is selected, it is showing me only the selected year.

When I tryied to put Year= in the expression, it didn´t work cause used all the years to make the calculation but continues showing me the selected year only.

The graph is on the right

sunny_talwar

May be this:

Only({<[Reporting Calendar Year]>} Aggr(Rank(Sum({$<[Broker Group Name], [Reporting Calendar Year]>} $(vCurrency)))* Avg({<[Reporting Calendar Year]>}1), [Reporting Calendar Year], [Broker Group Name]))

rcandeo
Creator III
Creator III
Author

Wonderful!!! Thank you again and again!

sunny_talwar

No problem