Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good morning,
I am struggling with this problem that involves set analysis. My objective is to calculate the count of inspections but considering different weights for each Category (2 and 3 have double weight) if MotivoID is 1, because if it is 2 should be single weight as it is for categories 1, 6 and 7.
My code is:
= (if(Ano > 2011 and MotivoID <> 2,
( 2 * Count({$< CategoriaID = {"2"} >} InspeccaoID ) +
// Count({$< CategoriaID = {"2"} >} InspeccaoID ) +
// Count({$< CategoriaID = {"3"} >} InspeccaoID ) +
2 * Count({$< CategoriaID = {"3"} >} InspeccaoID ) +
Count({$< CategoriaID = {"1"} >} InspeccaoID ) +
Count({$< CategoriaID = {"6"} >} InspeccaoID ) +
Count({$< CategoriaID = {"7"} >} InspeccaoID )
))
+
if(Ano > 2011,
count({$ <[MotivoID] = {"2"}>} InspeccaoID)))
So far it hasn't gave me the results I am looking for.
Any help will be very helpful.
Thanks in advance,
afonso
Try this url
http://tools.qlikblog.at/SetAnalysisWizard/QlikView-SetAnalysis_Wizard_and_Generator.aspx?sa=
Gr. Sandeep
Would you be so kind to send me a small file with an inline table which gives me a small example containing the fields:
Ano, MotivoID, CategoriaID and InspecaoID
In the meantime you can also use this document:
I think I managed to find a solution that solve my problem.
Thanks to all that try to help me.
Thanks Sandeep. With all this notes I managed to solve my problem.
Best regards,
Afonso Lopes
Enviada: segunda-feira, 12 de Agosto de 2013 12:29
Para: Afonso Lopes
Assunto: - Re: help with set analysis
<http://community.qlik.com/index.jspa> QlikCommunity
Re: help with set analysis
created by Sandeep Hamelink <http://community.qlik.com/people/shahamel> in New to QlikView - View the full discussion <http://community.qlik.com/message/377835#377835>