Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Set Analysis Sum B/w two dates

Hi,

I am trying to get the sum by set analysis b/w two dates. Following is the table which have the value in CDC1 and CDC7. Total Sum of CDC1 is 2 And CDC7 is 7.

The table I am trying to design as below:

 

Draw

Description

CDC1

CDC7

EM+

Last 3 Months

2

3

 

Can you please advise me related to this? The sample qvw file is attached.

Kind regards,

Farrukh

 

1 Solution

Accepted Solutions
sunny_talwar

May be try this

=Sum({$<Draw={$(=Draw_EM)}, Period={">=$(=vPeriodStart)<=$(=vPeriodEnd)"}>}Aggr(Only({$<Draw={$(=Draw_EM)}, Period={">=$(=vPeriodStart)<=$(=vPeriodEnd)"}>} CDC1), Draw, Period, Result, Description))

and

=Sum({$<Draw={$(=Draw_EM)}, Period={">=$(=vPeriodStart)<=$(=vPeriodEnd)"}>}Aggr(Only({$<Draw={$(=Draw_EM)}, Period={">=$(=vPeriodStart)<=$(=vPeriodEnd)"}>} CDC7), Draw, Period, Result, Description))

Capture.PNG

View solution in original post

7 Replies
olivierrobin
Specialist III
Specialist III

hello

try in a set analysis using th syntax

month={'>Inital Month<Last Month'}

chinnuchinni
Creator III
Creator III

can attach the app,then  we can try to help you .

Anonymous
Not applicable
Author

I tried this but did not work.

Currently using the below set analysis as below:

Dimension:

=Aggr(Only({$<Draw={$(=Draw_EM)}, Period={">=$(=vPeriodStart)<=$(=vPeriodEnd)"}>} Draw) , Draw)

Expression:

=Sum({$<Draw={$(=Draw_EM)}, Period={">=$(=vPeriodStart)<=$(=vPeriodEnd)"}>} CDC1)

Anonymous
Not applicable
Author

Hi Praveen,

Please see the attached qvw file.

Kind regards,

Farrukh

Anonymous
Not applicable
Author

Hi Olivier,

Currently using the below set analysis as below:

Dimension:

=Aggr(Only({$<Draw={$(=Draw_EM)}, Period={">=$(=vPeriodStart)<=$(=vPeriodEnd)"}>} Draw) , Draw)

Expression:

=Sum({$<Draw={$(=Draw_EM)}, Period={">=$(=vPeriodStart)<=$(=vPeriodEnd)"}>} CDC1)

Also I tried with Sum(CDC1) but did not work.

Regards,

Farrukh

sunny_talwar

May be try this

=Sum({$<Draw={$(=Draw_EM)}, Period={">=$(=vPeriodStart)<=$(=vPeriodEnd)"}>}Aggr(Only({$<Draw={$(=Draw_EM)}, Period={">=$(=vPeriodStart)<=$(=vPeriodEnd)"}>} CDC1), Draw, Period, Result, Description))

and

=Sum({$<Draw={$(=Draw_EM)}, Period={">=$(=vPeriodStart)<=$(=vPeriodEnd)"}>}Aggr(Only({$<Draw={$(=Draw_EM)}, Period={">=$(=vPeriodStart)<=$(=vPeriodEnd)"}>} CDC7), Draw, Period, Result, Description))

Capture.PNG

Anonymous
Not applicable
Author

Thanks a mil Sunny.

Its sorted.

Kind regards,

Farrukh