Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
We have a requirement where we need to show one table with data associated with all filter values applied.
Data sample:
Test:
LOAD * INLINE [
Patient, Symptoms
A, Cough
A, Fever
A, Cold
C, Cough
C, Cold
D, Cold
E, Cough
F, Fever
];
we will have filter for Symptoms and one table with Patient.
So when we apply filter for "Fever" only Patient F should display
when we select "Cough & Cold" Only Patient C should display
likewise if we select "Cold" only Patient D should display.
Any help would be great.
Regards, Tauceef
@tauceef may be like this :
in load script:
Test:
LOAD * INLINE [
Patient, Symptoms
A, Cough
A, Cough
A, Fever
A, Cold
C, Cough
C, Cold
D, Cold
E, Cough
F, Fever
];
left join load Patient,concat(distinct Symptoms,', ') as conatSymptoms resident Test group by Patient;
and then create table
dimension: Patient
measure:
if(GetFieldSelections(Symptoms)=conatSymptoms,GetFieldSelections(Symptoms))
and uncheck inclure null value
output:
@tauceef may be like this :
in load script:
Test:
LOAD * INLINE [
Patient, Symptoms
A, Cough
A, Cough
A, Fever
A, Cold
C, Cough
C, Cold
D, Cold
E, Cough
F, Fever
];
left join load Patient,concat(distinct Symptoms,', ') as conatSymptoms resident Test group by Patient;
and then create table
dimension: Patient
measure:
if(GetFieldSelections(Symptoms)=conatSymptoms,GetFieldSelections(Symptoms))
and uncheck inclure null value
output:
Awesome you are, it works. Thanks for your help 🙂.
Only thing is, instead of Measure we have to take 2nd column as Dimension only.