Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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).
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:
Thank you @Taoufiq_Zarra !
Do you think such effect would be possible to achieve on chart level directly, without data re-load?
@Mt3 I don't think so, or I have no idea 🙂
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.
another solution might be:
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