Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

Conditional Sum

I want to add two quarters on selecting a half year. The two quarters hold the value of the last month of each quarter. So basically i want to sum up the values of the last months of the quarters.

An example:

    

half-year : 1         quarters : 1               months : June (50 for say)

                                         2                            September (100 for say)

so on selecting half year : 1 the expression column should display 150

Any idea on how the expression should be?

3 Replies

Re: Conditional Sum

Can help you out without checking your sample file or apps but you can try something like this..

For Selecting an entire last month of quarter...

MonthStart(QuarterEnd(Today()))

to

MonthEnd(QuarterEnd(Today()))

Not applicable

Re: Conditional Sum

Very simple solution if you can change the data model. Modify existing calendar table or add a new table that has the half year preselected.

 

LOAD * INLINE [
Month, HalfYear
1, 0
2, 0
3, 1
4, 0
5, 0
6, 1
7, 0
8, 0
9, 2
10, 0
11, 0
12, 2
]
;

jsaradhi
Valued Contributor

Re: Conditional Sum

i think attaching sample data/file with expected output would help in resolving this sooner. you think you can upload a sample data or a qvw?

Community Browser