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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Title of chart changing with its content

Hello,

I have a table where its only dimension is a group of fields. For my exeample, I have the sales representative as first, foolowed by the customers, their order and finally the different quotes made. So when I click on a representative, I get all its customers, when I click on one of these customers, I get its order etc etc.

In the title of my chart, I would like it to change depending on what level I am and which selection is made. Therefore I used this expression:

='TBC Commercial 1 - ' & GetFieldSelections(Name_representative) & ' - ' & FO_REFERENCE & ' - ' & GetFieldSelections(ORDER_NUMBER)

The matter is that when a customer only has one order, it doesn't show it, but it goes directly to the different quotes and I cannot get the value of the field "order_number" which is quite unpleasant. Is there another way to do so?

Thanks a lot!

8 Replies
datanibbler
Champion
Champion

Hi,

you could try using the function GETPOSSIBLECOUNT() instead - when only one value in a field is selectable, that would show. When more than one value is selectable, you would not get any results this way, you'd have to use GETFIELDSELECTIONS() again - you will probably have to use both in an IF_construct.

HTH

Best regards,

DataNibbler

Not applicable
Author

So I tried this:

='TBC Commercial 1 - ' & GetFieldSelections(Name_représentant) & ' - ' & if(GetPossibleCount(FO_REFERENCE)>1, GetFieldSelections(FO_REFERENCE), GetPossibleCount(FO_REFERENCE))

but however, it gives me the value "1" for the true and false value. I tired it on a customer that has more than one order so it should give the reference, but it give me "1" instead 😕

jagan
Partner - Champion III
Partner - Champion III

Hi,


Try like this, I think FO_REFERENCE is causing the issue


='TBC Commercial 1 - ' & GetFieldSelections(Name_representative) & ' - ' & MaxString(FO_REFERENCE) & ' - ' & GetFieldSelections(ORDER_NUMBER)


or


='TBC Commercial 1 - ' & GetFieldSelections(Name_representative) & ' - ' & GetFieldSelections(FO_REFERENCE) & ' - ' & GetFieldSelections(ORDER_NUMBER)


Hope this helps you.


Regards,

Jagan.

Not applicable
Author

Hi,

I tried the second one, but when there is no FO_REFERENCE, it directly jump into the next level of the group (which is not a prolbem), so I cannot select the reference and thereore i cannot recover the value of that field (since no selction is made)

jagan
Partner - Champion III
Partner - Champion III

Hi,

Concat(DimensionName, ',') -- It gives all the possible values of a given Dimension.  If possible can you attach sample file and expected output.

Regards,

Jagan.

Not applicable
Author

This could work, but it's not working, here is what it should look like:

Say for example, Name_representative = Patrick and he has customer A, C and E.

Customer C is selected and has multiple orders, we select the number 121212

Then the title looks like this

TBC 01 - Patrick - C - 121212

On the other side, if customer E is selected and has only one order, the table shows directly the different quotes of that order.

Therefore, the title of the table is not showing the order number and it only shows

TBC01 - Patrcik - E

which is not helpful because, the table is showing the different quotes but we don't what order it is from 😕

jagan
Partner - Champion III
Partner - Champion III

Hi,

Can you attach the sample file?

or try Concat() instead of GetFieldSelections().

='TBC Commercial 1 - ' & GetFieldSelections(Name_representative) & ' - ' & MaxString(FO_REFERENCE) & ' - ' & Concat(ORDER_NUMBER, ',')


or


='TBC Commercial 1 - ' & GetFieldSelections(Name_representative) & ' - ' &GetFieldSelections(FO_REFERENCE) & ' - ' & Concat(ORDER_NUMBER, ',')

Regards,

Jagan.

Not applicable
Author

Hello,

I tried it, but when I have more than one order for a customer, it gives me the last customer while no selection is made 😕

Moreover, when I select a customer, it lists me all the orders numbers, while no selection is made either.