Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
upaliwije
Creator II
Creator II

Set Expression Calculation

Hi Friends

I have Pivot table with some calculation. But  It  returns 0 value. Pls have a look at below image and advise me where I am wrong. My below expression show zero value 

sum({<MonthYear={'FMonthYear'}>}PREMIUM) 

Screenshot_1.png

10 Replies
shiveshsingh
Master
Master

May be this?

 

sum({<MonthYear={"=$(FMonthYear)"}>}PREMIUM) 

upaliwije
Creator II
Creator II
Author

Thanks Friend

 

Still the result shown is zero

tresesco
MVP
MVP

What is FMonthYear, is it a field or a variable?
upaliwije
Creator II
Creator II
Author

it is a field created with following syntax

Num(Year(POL_PERIOD_FROM)) & Num(Month(POL_PERIOD_FROM), '00')AS FMonthYear;

 

tresesco
MVP
MVP

And what are trying to get by the expression: sum({<MonthYear={'FMonthYear'}>}PREMIUM) ? Could you explain words? Is it like - 'sum premium where MonthYear and FMonthYear are equal' ?
upaliwije
Creator II
Creator II
Author

I want to sum the premium when MonthYear and FMonthYear are equal. If you look at my image you see similar result when Month=Fmonth

Screenshot_1.png

tresesco
MVP
MVP

I think the approach you are taking might not be very convincing. Could you are your app sample and explain the expected output against that?
upaliwije
Creator II
Creator II
Author

Thanks Tresesco,

I have some insurance policy date in my attached QV document.  In this data there are policies and subsequent  cancellation as well. I want to show the Premium amount in a particular month and below that the subsequent cancellation relating to such policies under the same column. Eg : POLICY_NO AH00141A0000032 IS Introduced  IN Dec 2015  and cancelled in Mar 2016. So I want to show both transactions in the same column against different months (FvMonthYear). I have shown below the images for your easy reference please. Kindly help me to develop this pivot table. Thanks

Screenshot_1.png  

 

Screenshot_2.png

 

tresesco
MVP
MVP

I am not yet quite sure about your requirement. Try:

sum({<MonthYear={"=MonthYear=FMonthYear"}>}PREMIUM)