Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I want to clarify my question. Think about there is a database that shows composites analysis results. But, for some level of results, additioanl re-test (detailed analysis) performed. Total database will become generally not detailed analysis data. But inside there will be some additional detailed analysis results. I want to filter in the summary report to see farm data as;
Thanks
farm id | detailed analysis | Analysis results | # of actives |
---|---|---|---|
farm 01 | No | 100 | 15 |
farm 02 | Yes | 50 | 20 |
farm 02 | No | 150 | 20 |
farm 03 | Yes | 90 | 50 |
Try with:
If(Aggr(Only(detailed_analysis), farm_id) = 'Yes' or Aggr(Only(detailed_analysis), farm_id) = 'No', 1,
If(detailed_analysis = 'Yes', 1,0))
Saludos
Hi,
You can try with group by farm id.
DATA:
LOAD
*
INLINE [
farm_id, detailed_analysis, Analysis_results, #_of_actives
farm 01, No, 100, 15
farm 02, Yes, 50, 20
farm 02, No, 150, 20
farm 03, Yes, 90, 50
];
Left Join
LOAD
farm_id,
If(Only(detailed_analysis)='No' or Only(detailed_analysis)='Yes', 1, 0) as "FLAG"
Resident DATA
Group by farm_id
;
NoConcatenate
DATA2:
LOAD
farm_id,
detailed_analysis,
Analysis_results,
#_of_actives,
If(detailed_analysis = 'Yes', 1,FLAG) as "FLAG"
Resident DATA;
DROP Table DATA;
Saludos.
Thanks Federico
But I want to perform this in the pivot table
Try with:
If(Aggr(Only(detailed_analysis), farm_id) = 'Yes' or Aggr(Only(detailed_analysis), farm_id) = 'No', 1,
If(detailed_analysis = 'Yes', 1,0))
Saludos
Federico
Thanks a lot!
You´re welcome