Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there,
I have a big problem count with if.
I have 3 fields (in Excel file) ID, DATE1 and DATE2 something like that:
ID | DATE 1 | DATE 2 |
1 | 20/04/2016 | 20/04/2016 10:11 |
2 | 20/04/2016 | 20/04/2016 10:03 |
3 | 20/04/2016 | 20/04/2016 09:26 |
4 | 20/04/2016 | 20/04/2016 08:22 |
5 | 20/04/2016 | 20/04/2016 08:21 |
6 | 20/04/2016 | 20/04/2016 07:43 |
7 | 20/04/2016 | 20/04/2016 09:26 |
I make a IF combination that depends of some values.
I make a Table in qlik and add as Dimension ID, DATE 1 and DATE 2 and as measure "IF combination"
The table in qlik shows like that:
ID | DATE 1 | DATE 2 | if((interval(AVG({$< |
1 | 20/04/2016 | 20/04/2016 10:11 | YES |
2 | 20/04/2016 | 20/04/2016 10:03 | YES |
3 | 20/04/2016 | 20/04/2016 09:26 | YES |
4 | 20/04/2016 | 20/04/2016 08:22 | YES |
5 | 20/04/2016 | 20/04/2016 08:21 | NO |
6 | 20/04/2016 | 20/04/2016 07:43 | NO |
7 | 20/04/2016 | 20/04/2016 09:26 | YES |
Previous table works! but i need count YES of this measure and divide by the total ID!
I tried create like a variable (dont works)
I tried make a count(statement) (dont works).
I dont know what to do!
Thanks for all.
Script is
LOAD ID,
[DATE 1],
[DATE 2],
[if((interval(AVG({$<] as Field
FROM
[https://community.qlik.com/thread/214302]
(html, codepage is 1252, embedded labels, table is @2);
expression in textbox
=num(count({$ <Field={'YES'}>} Field) / Count(ID), '#,##0.00%')
I have some errors.
Can you send me the .qvf?
Thanks!
What is the expression which gives you YES and NO?
(if((interval(AVG({$<[Categoria del sitio]={'C1'},[Status]={'Closed'},[Tracker]={'CM'}>}[Displacement time]), 'hh:mm:ss'))<='1','YES',
if((interval(AVG({$<[Categoria del sitio]={'C2'},[Status]={'Closed'},[Tracker]={'CM'}>}[Displacement time]), 'hh:mm:ss'))<='3','YES',
if((interval(AVG({$<[Categoria del sitio]={'C3'},[Status]={'Closed'},[Tracker]={'CM'}>}[Displacement time]), 'hh:mm:ss'))<='3','YES',
if((interval(AVG({$<[Categoria del sitio]={'C4'},[Status]={'Closed'},[Tracker]={'CM'}>}[Displacement time]), 'hh:mm:ss'))<='8','YES',
if((interval(AVG({$<[Categoria del sitio]={'C5'},[Status]={'Closed'},[Tracker]={'CM'}>}[Displacement time]), 'hh:mm:ss'))<='12','YES','NO'))))))
Thanks!