Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
clarcombe
Contributor III
Contributor III

Two font colors in text colour expression

Hello,

I would like to have the first part of an expression in one colour and the second in another. Is there any way that this is possible ?

e.g. 1-400031 where the 1- is in white and the 400031 is in black

 

Thanks

1 Solution

Accepted Solutions
clarcombe
Contributor III
Contributor III
Author

Hi,

Thanks for this.

Whilst playing around with dual, I tried

Dual(TASK_ID,ORDER & TASK_ID) and this worked

 

View solution in original post

12 Replies
EliGohar
Partner - Creator III
Partner - Creator III

@clarcombe It's not clear enough, Can you take a screenshot of the parts you want to color?

clarcombe
Contributor III
Contributor III
Author

WhiteAndBlack.JPGIts the 2nd dimension I'm concerned with. As I cannot sort by a column that is not a dimension, I have to concatenate it to another dimension and then sort by that, but I don't want to see it.

AshutoshBhumkar
Partner - Specialist
Partner - Specialist

Hi,

I would suggest to remove first part of the dimension using SubField(Tache,'-',2) as Tache.

Extract sorting number from Dimension Tache using Subfield(Tache,'-',1) as Tache_Sort.

 

Use the Tache_Sort in the pivot dimension sorting .

 

Below is the example with sample data.

Table:
Load ID,Dept,Values,
Subfield(ID,'-',1) as ID_Sort,
Subfield(ID,'-',2) as New_ID;

Load * Inline [
Dept,ID,Values
Medical,3-4000030,2000
Medical,4-4000566,3000
Medical,2-4003435,1000
Medical,12-4003436,1000 ];

Output :

AshutoshBhumkar_0-1633338314764.png

 

Thanks,

Ashutosh

 

abhijitnalekar
Specialist II
Specialist II

Hi @clarcombe,

Have you tried to Sort the dimension by using the sort by expression property where you can give the dimension which you have added. 

Regards,
Abhijit
keep Qliking...
Help users find answers! Don't forget to mark a solution that worked for you!
clarcombe
Contributor III
Contributor III
Author

Thankyou for your replies.

I actually want to sort by a column ORDER  which I DON'T want as a dimension. I have prepended the ORDER column to the TASK_ID column to get the correct sorting.

so I am now trying to HIDE the ORDER- part of the field as its not something the user should see.

 

abhijitnalekar
Specialist II
Specialist II

Hi @clarcombe ,

I got your point.

This can done this by as below.

1. Add the normal dimension (Without adding order ID to it) which you want to show the user.

2. Now add an order ID as the second dimension.

3. Place it first in the table so the table will be sorted on the orderID. 

4. type 0 in show column if text box.

Hope this helps you.

 

Regards,
Abhijit
keep Qliking...
Help users find answers! Don't forget to mark a solution that worked for you!
clarcombe
Contributor III
Contributor III
Author

Hi,

I had previously tried this but it doesn't work.

Order.JPGORDER should actually be the second dimension.If I then make it visible, it creates new totals by ORDER but shows them in the right order.

I already have an open forum entry for this problem, but no-one can solve it.

abhijitnalekar
Specialist II
Specialist II

Hi @clarcombe ,

 

Can you please try with below dimension.

Dual(maindimension,orderid).

This will help you to sort the dimension on order id and it will show the original values to the user.

Regards,
Abhijit
keep Qliking...
Help users find answers! Don't forget to mark a solution that worked for you!
clarcombe
Contributor III
Contributor III
Author

Added DUAL(DEPT_DESC_FR,ORDER) to the expression. Not what I needed. Any other ideasAdded DUAL(DEPT_DESC_FR,ORDER) to the expression. Not what I needed. Any other ideas