Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
I have an issue in a simple table.
I have buildings and for each one i want to deduce energy class with a reference file.
Here's my model :
and my calculation :
=MinString({$ <CLASS_MIN_NRJ_METROP={"=Sum((FACT_C_CONSO_BRANCHE*COEFF_RATIO_EP_EF)/OCC_SUBL)>=CLASS_MIN_NRJ_METROP"}
,CLASS_MAX_NRJ_METROP={"=Sum((FACT_C_CONSO_BRANCHE*COEFF_RATIO_EP_EF)/OCC_SUBL)<CLASS_MAX_NRJ_METROP"}>
} CLASS_CLASSE)
But with this calculation, i don't have good results when i have several buildings. If i select just one building, then the result is OK.
Example :
Building | Result i want to have | Result i have |
---|---|---|
1 | A | G |
2 | C | G |
3 | E | G |
4 | G | G |
and when i choose juste one :
Building | Result i want to have | Result i have |
---|---|---|
2 | C | C |
I think the issue is with the set analysis but i don't know why.
Can someone help me ? Sorry for my english, i hope i'm understandable.
Alexis
Your tables TRE_CLASS is a data island. It's not connected to any other table in your data model. That means you're working with a cartesian product. For each CLASSE_something value all the values in the TFA_FACTU... table are possible values. That's why set analysis does not work. The set is calculated at the chart level, not the row level. You will have to use if-statements if you want to keep your current data model. Perhaps you should calculate the sums per building in the script and do an intervalmatch with the TRE_CLASS table to match the sum with the interval and so with the CLASS_CLASSE value for that interval.