Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

QlikView : Issue with set analysis in simple table

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 :

model.PNG

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 :

BuildingResult i want to haveResult i have

1

AG
2CG
3EG
4GG

and when i choose juste one :

BuildingResult i want to haveResult i have
2CC

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

1 Reply
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

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.


talk is cheap, supply exceeds demand