No Translation available yet
You have Slovak selected as language but this page has not been translated yet. Translate the page or view the content in the default space language below.
Display default
The goal of this tutorial is to display the frequencies of visits based on visit counts in individual countries.
Download: Demo structure & data.
Simple Frequencies
Use memberSum function to force BellaDati to aggregate data on specific level. Since frequencies for particular countries are calculated, apply Country attribute as memberSum parameter.
int a = 0
membersSum('L_COUNTRY') {
int v = value('L_COUNTRY_COUNT')
if (v == 2) { // For 2 visits per interval
a++
}
}
return a
Frequencies by Categories
Extend eachMember function parameters by Category attribute to add another dimension to your frequency analysis.
int a = 0
eachMember('[L_CATEGORY][L_COUNTRY]') { // Category added
int v = value('L_COUNTRY_COUNT')
if (v == 2) { // For 2 visits per interval
a++
}
}
return a
Frequencies by Categories and Regions
Add another parameter to memberSum function in order to further extend dimensionality.
int a = 0
eachMember('[L_REGION][L_CATEGORY][L_COUNTRY]') { // Region and category added
int v = value('L_COUNTRY_COUNT')
if (v == 2) { // For 2 visits per interval
a ++
}
}
return a
Next Steps