Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Our next Qlik Insider session will cover new key capabilities. Join us August 11th REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
123qlik123
Contributor II
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
jagan
Luminary Alumni
Luminary Alumni

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.

View solution in original post

8 Replies
sunny_talwar

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
Specialist
Specialist

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
Contributor II
Contributor II
Author

Hi Vamsee,

Thanks for the reply.

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

Best Regards,

MR

123qlik123
Contributor II
Contributor II
Author

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

sunny_talwar

May be a sample might help see the issue

jagan
Luminary Alumni
Luminary Alumni

Hi MR,

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

Regards,

Jagan.

jagan
Luminary Alumni
Luminary Alumni

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.

View solution in original post

sunny_talwar

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