Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

123qlik123
New Contributor II

Not working - Ignoring the field value in Set analysis

Hi Experts,

I have tried to ignoring the fields in the set modifiers, but not able to ignore the field values in the set analysis in textbox.

Please find the below textbox expression

=MinString({<Field1=, Field2=>} Aggr(If($(eAverageTimeToOpenEmail) = vMinAverageTimeToOpenEmailDay, WeekDay), WeekDay))

& ' ('&

Aggr(If( Min({<Field1=, Field2=>} Aggr($(vAverageTimeToOpenEmail), WeekDay ,EmailFirstOpenTimeHour)) = vMinAverageTimeToOpenEmailbyHour, EmailFirstOpenTimeHour), EmailFirstOpenTimeHour)

& ')      '&

'(' & Num(vMinAverageTimeToOpenEmailDay, '#,##0.0') & ' Days)'

Kindly find above expression variable expressions.

1. eAverageTimeToOpenEmail = Avg({<Field1=, Field2=,  OpenedFlag={'Y'},SentEmailStatus={'Delivered'}, EmailActivityType={'Opened'}>} EmailOpenDuration)


2. vMinAverageTimeToOpenEmailDay = Min({<Field1=, Field2=>}Aggr($(vAverageTimeToOpenEmail), WeekDay))


3. vMinAverageTimeToOpenEmailbyHour=Min({<Field1=, Field2=>}Aggr($(vAverageTimeToOpenEmail), WeekDay ,EmailFirstOpenTimeHour))

kindly help me. Thanks a lot.!

Best Regards,

MR.

1 Solution

Accepted Solutions
MVP & Luminary
MVP & Luminary

Re: Not working - Ignoring the field value in Set analysis

Since you only get only one value you can use Only() it will work.


=Only({<Field1=, Field2=>} Aggr(If($(eAverageTimeToOpenEmail) = vMinAverageTimeToOpenEmailDay, WeekDay), WeekDay))


Regards,

Jagan.

8 Replies

Re: Not working - Ignoring the field value in Set analysis

Try this

=MinString({<Field1=, Field2=>} Aggr(If($(eAverageTimeToOpenEmail) = vMinAverageTimeToOpenEmailDay, Only({<Field1=, Field2=>} WeekDay)), WeekDay))

& ' ('&

Only({<Field1=, Field2=>} Aggr(If( Min({<Field1=, Field2=>} Aggr($(vAverageTimeToOpenEmail), WeekDay ,EmailFirstOpenTimeHour)) = vMinAverageTimeToOpenEmailbyHour, Only({<Field1=, Field2=>} EmailFirstOpenTimeHour)), EmailFirstOpenTimeHour))

& ')      '&

'(' & Num(vMinAverageTimeToOpenEmailDay, '#,##0.0') & ' Days)'

vamsee
Valued Contributor

Re: Not working - Ignoring the field value in Set analysis

Hello,

I haven't checked your set yet but I have noticed a difference in two variables.


vAverageTimeToOpenEmail

eAverageTimeToOpenEmail


I hope this is a typo in the community not in the app.

123qlik123
New Contributor II

Re: Not working - Ignoring the field value in Set analysis

Hi Vamsee,

Thanks for the reply.

Sorry for the typo error. Yes, both variables are same only.

Best Regards,

MR

123qlik123
New Contributor II

Re: Not working - Ignoring the field value in Set analysis

Hi Sunny,

Thanks a lot for the reply.

We tried the same way but still it's not working as expected. It's working for Field1 when is select in filter, but it didn't work for all the cases of field1 or field2 selections. Like if my field1&2 values is in excluded then it's showing as null other wise it's showing the weekday.

Please suggest.

Best Regards,

MR

Re: Not working - Ignoring the field value in Set analysis

May be a sample might help see the issue

Highlighted
MVP & Luminary
MVP & Luminary

Re: Not working - Ignoring the field value in Set analysis

Hi MR,

I think it is the problem with the MinString().

Regards,

Jagan.

MVP & Luminary
MVP & Luminary

Re: Not working - Ignoring the field value in Set analysis

Since you only get only one value you can use Only() it will work.


=Only({<Field1=, Field2=>} Aggr(If($(eAverageTimeToOpenEmail) = vMinAverageTimeToOpenEmailDay, WeekDay), WeekDay))


Regards,

Jagan.

Re: Not working - Ignoring the field value in Set analysis

Jagan - What would be the problem with MinString? Not sure I understand why when Only works, MinString doesn't work?