Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Mt3
Contributor III
Contributor III

Flagging reoccurring value

Hi,

How can we highlight in QlikSense variables that have already been assigned to another value?

Exemplary, in FieldName we have Field1, Field2, Field3. If a Value of 1 have already appeared in Value column and has been assigned to Field1, i would like to highlight it when it appears again and is assigned to Field2 this time.

Its aimed to be a chart feature (table).

Mt3_0-1643639330238.png

 

5 Replies
Taoufiq_Zarra

@Mt3 

Maye be like :

Data:


load *,rowno() as ID inline [
FieldName,Value
Field1,1
Field2,1
Field1,2
Field1,2
Field3,4
Field1,3
Field3,3
];
left join load Value,count(distinct FieldName) as FieldNameFlag resident Data group by Value;


output:
noconcatenate

load *,if(peek(FieldNameFlag)>1 and peek(Value)=Value,'assigned','not assigned') as Flag resident Data order by Value,ID;

drop table Data;
drop fields FieldNameFlag;

 

output:

Taoufiq_Zarra_0-1643706368580.png

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
Mt3
Contributor III
Contributor III
Author

Thank you @Taoufiq_Zarra !

Do you think such effect would be possible to achieve  on chart level directly, without data re-load?

Taoufiq_Zarra

@Mt3  I don't think so, or  I have no idea 🙂

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
jbhappysocks
Creator II
Creator II

Hello

Second version of this answer, might have misunderstood exactly how you wanted Values to be assigned to FieldNames. But IF you want it based on script loadorder, ie the first loaded combination of FieldName and Value is what we want to assign, not the lowest for example, then you can use Aggr. 

The exact aggregation here is not important, it's just the fact that the result will be displayed on the first loaded row. The idea is shown in the last two columns here. 

jbhappysocks_0-1643726494899.png

 

MarcoWedel

another solution might be:

MarcoWedel_0-1643737741952.png

 

MarcoWedel_1-1643737773575.png

 

 

table1:
Load RecNo() as RecID,
     *,
     If(AutoNumber(FieldName,Value)>1,1,0) as Reoccurred
Inline [
	FieldName, Value
	Field1, 1
	Field2, 1
	Field1, 2
	Field1, 2
	Field3, 4
	Field1, 3
	Field3, 3
];

 

 hope this helps

Marco