Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis - 2 measures based on selection

Hi,

I had a requirement where I need to show the Measure for Selected Month , Previous 2 months and next 2 months.

For which I am using

SUM({$<MonthNumber = {'>=$(StartDate)<=$(EndDate)'}>} Sales)


Now my problem is the Sales Value comes from a different table for the previous months and the current comes from a different table.

It has to be viewed in the same chart.

Can SET analysis work here ?

Please help.

Regards,

Chinmay

Labels (1)
1 Solution

Accepted Solutions
Not applicable
Author

Got it right 😄


Current:
load * inline
[
MonthNumber, Sales, MonthName
1,10, Jan
2,20, Feb
3,30, Mar
4,40, Apr
5,60, May
6,70, June
7,80, July
8,90, Aug
9,100, Sep
];

Future:
load * inline
[
MonthNumber, Sales_Future, MonthName
1,100, Jan
2,200, Feb
3,300, Mar
4,400, Apr
5,600, May
6,700, June
7,800, July
8,900, Aug
9,1000, Sep
]
SUM({$<MonthNumber = {'>=$(StartDate)<=$(CurrDate)'}>} Sales)+ SUM({$<MonthNumber = {'>$(CurrDate)<=$(EndDate)'}>} Sales_Future)



View solution in original post

3 Replies
Miguel_Angel_Baeyens
Support
Support

Hello Chinmay,

Please check this post and the attached application to see how to link the Sales table to a Master Calendar, so your expression works.

Hope that helps.

Not applicable
Author

Got it right 😄


Current:
load * inline
[
MonthNumber, Sales, MonthName
1,10, Jan
2,20, Feb
3,30, Mar
4,40, Apr
5,60, May
6,70, June
7,80, July
8,90, Aug
9,100, Sep
];

Future:
load * inline
[
MonthNumber, Sales_Future, MonthName
1,100, Jan
2,200, Feb
3,300, Mar
4,400, Apr
5,600, May
6,700, June
7,800, July
8,900, Aug
9,1000, Sep
]
SUM({$<MonthNumber = {'>=$(StartDate)<=$(CurrDate)'}>} Sales)+ SUM({$<MonthNumber = {'>$(CurrDate)<=$(EndDate)'}>} Sales_Future)



Not applicable
Author

Hi Miguel,

Thanks for the help.

I had figured out how to filter the Date, the issue was with 2 sets coming from two different tables.

Thanks a lot 😄

Regards,

Chinmay