Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI Team,
I am trying to build an application which has to provide frequency or occurrence of each value for all the columns/fields in single chart.
I found some applications with the above requirement with single field selection. (App name :FieldObserver)
Any help is much appreciated.
Hi Manoj,
Below is one way of calculating the frequency or occurrence of each value for all the columns/fields in single table chart.
Try this out, it may help you to continue further on the same.
let tablename='tablename';
Count: load * inline [ColumnName,ColumnValue,ColumnCount];
for i=1 to NoOfFields('$(tablename)')
let vcolumnname=FieldName(i,'$(tablename)');
concatenate (Count)
load
'$(vcolumnname)' as ColumnName,
$(vcolumnname) as ColumnValue,
count(1) as ColumnCount,
1 as tmp
resident $(tablename)
group by $(vcolumnname);
next i;
left join (Count)
load
ColumnName,
count(tmp) as distinct
resident Count
group by ColumnName;
drop Field tmp;
Hi Manoj,
Below is one way of calculating the frequency or occurrence of each value for all the columns/fields in single table chart.
Try this out, it may help you to continue further on the same.
let tablename='tablename';
Count: load * inline [ColumnName,ColumnValue,ColumnCount];
for i=1 to NoOfFields('$(tablename)')
let vcolumnname=FieldName(i,'$(tablename)');
concatenate (Count)
load
'$(vcolumnname)' as ColumnName,
$(vcolumnname) as ColumnValue,
count(1) as ColumnCount,
1 as tmp
resident $(tablename)
group by $(vcolumnname);
next i;
left join (Count)
load
ColumnName,
count(tmp) as distinct
resident Count
group by ColumnName;
drop Field tmp;