Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Fields:
company, probe, measure (in different parameters, here only 'm-dichlor' and 'p-dichlor' are considered)
Relations:
each company has several probes, each probe has measurements in different parameters.
Goal:
I want to calculate the numbers of probes in each company, whose p-dichlor measure / m-dichlor measure > 1.5 or <0.5
my divition of this p and m-dichlor measures is:
div(only({<[PARAMETER]={'p-Dichlorbenzol'}>} [MEASURE])*100, only({<[PARAMETER]={'m-Dichlorbenzol'}>} [MEASURE]))/100
Then when counting how many probes in each company are out of measure range for example smaller than 0.5, it doen't work:
count({<[PROBE_ID]={"=$(div(only({<[PARAMETER]={'p-Dichlorbenzol'}>} [MEASURE])*100, only({<[PARAMETER]={'m-Dichlorbenzol'}>} [MEASURE]))<50)"}>} [COMPANY_ID])
(I times the first field with 100 cause div() gives only integer value, the when the value is smaller than 0.5 it's smaller than 50 cause i times 100 before)
example: on the left is probe_id, the first row is 120/2=60, p/m bigger than 1.5 or smaller than 0.5 is what i want to count.
thanks!!!
The first thing one notices quickly is the use of the evaluation operator $() without a string passed to it. Could it be because you are confused on using search masks in set analysis? Try removing the evaluation operator:
count({<[PROBE_ID]={"=
// Removed $(
div(only({<[PARAMETER]={'p-Dichlorbenzol'}>} [MEASURE])*100,only({<[PARAMETER]={'m-Dichlorbenzol'}>} [MEASURE]))<50
// Removed)
"}>} [COMPANY_ID])
The first thing one notices quickly is the use of the evaluation operator $() without a string passed to it. Could it be because you are confused on using search masks in set analysis? Try removing the evaluation operator:
count({<[PROBE_ID]={"=
// Removed $(
div(only({<[PARAMETER]={'p-Dichlorbenzol'}>} [MEASURE])*100,only({<[PARAMETER]={'m-Dichlorbenzol'}>} [MEASURE]))<50
// Removed)
"}>} [COMPANY_ID])