Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis - Association between two table creating issues


Hi All,

I am new to Qlikview.

I am using below statement for Set Analysis.

=sum({ <[Report Month]={"<$(=[Report Month])"} > }[Review]

I have below two table which are Associated with field "Report Month".

Table1

ReportMonth     Product    Review

Jan-2014           ABC         1

Feb-2014           ABC         0

Mar-2014           ABC         1

Table2

ReportMonth   ProductCatogory

Jan-2014           Consumer

Feb-2014           Consumer

Mar-2014           Consumer

Apr-2014           Consumer

here, ReportMonth is common in both table

and also we need to associate this two table for some other reason.

but, here, problem is that,

we are using field Reportmonth in set analysis which is associated from two table,

so, i believed,

we are getting some duplicated records.

is there any way in set analysis,

to explicitly considered ReportMonth from Table1 Only ?

any help is appreciated.

Thanks!. 

18 Replies
MK_QSL
MVP
MVP


SUM({<[Report Month] = {'<$(=Max([Report Month]))'}>}Review)

Not applicable
Author

Hi Hailey,

I would simply create a unique month field in table1 only and use that in your set analysis.

When you load your table 1, just create a new field

[Report Month] As Table1_Report_Month

Then use the new field in your set analysis, you are sure to get just results from table1

Edit: as Manish points out though you will need to adjust your modifier as you can't use =[Report Month] in that way

hope that helps

Joe

Not applicable
Author


Joe,

i just need to replace Table1_Report_Month in below, correct ?

SUM({<[Report Month] = {'<$(=Max([Report Month]))'}>}Review)

Not applicable
Author

Yea that should work , the set is effectively then selecting from the field from table1 then

Not applicable
Author

Thanks.

I have tried this way,

but, still, it's not working.

duplicate records goes away,

but, we need SUM from all previous month,

that is not showing correctly.

I have Report Month is in the selection list box.

any suggestions ?

JonnyPoole
Employee
Employee

Can you share an example ?  It doesn't sound too hard to solve but having the data and/or the qvw could help.

Not applicable
Author

Ah right so you are selecting in Report Month I see, try the below maybe then or as Jonathan says post up some example to play with

SUM({<[Report Month] =, Table1_Report_Month={'<$(=Max([Report Month]))'}>}Review)

Not applicable
Author

Hi ,

i have Attached sample file.

Thanks for your help.

Not applicable
Author

Joe,

I have attached sample file for this issue in the main thread.

can you please look in that and let me know ?

Thanks!.