Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Converting to Set Analysis

Hi All,

Please do help me to convert the below formulae to a more simpler set analsysis form :

num(

count(DISTINCT

        if(GetFieldSelections(vfiltertype)='filter1',if([date1]>=monthstart and [date1]<=selectedDate and [flag1]='1',[key]),

        if(GetFieldSelections(vfiltertype)='filter2',if([date1]>=yearStart and [date1]<=selectedDate and [flag1]='1',[key]),

        if(GetFieldSelections(vfiltertype)='filter3',if([date1]>=yearStart and [date1]<=yearEnd and [flag1]='1',[key]),

        if([year1]=year(date2) and [flag1]='1' and [flag2]='0' and [flag3]='0'

        and ([status]='status1' or [status]='status2'),[key])))))+

count(DISTINCT

        if(GetFieldSelections(vfiltertype)='filter1',if([date3]>=monthstart and [date3]<=selectedDate and [flag2]='1',[key]),

        if(GetFieldSelections(vfiltertype)='filter2',if([date3]>=yearStart and [date3]<=selectedDate and [flag2]='1',[key]),

        if(GetFieldSelections(vfiltertype)='filter3',if([date3]>=yearStart and [date3]<=yearEnd and [flag2]='1',[key]),

        if([date4]=year(date2) and [flag2]='1',[key])))))+

        count(DISTINCT

        if(GetFieldSelections(vfiltertype)='filter1',if([date5]>=monthstart and [date5]<=selectedDate and [flag3]='1',[key]),

        if(GetFieldSelections(vfiltertype)='filter2',if([date5]>=yearStart and [date5]<=selectedDate and [flag3]='1',[key]),

        if(GetFieldSelections(vfiltertype)='filter3',if([date5]>=yearStart and [date5]<=yearEnd and [flag3]='1',[key]),

        if([date6]=year(date2) and [flag3]='1',[key])))))

    ,'#,##0')

Thanks in advance.

Brooklyn

0 Replies