Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
upaliwije
Creator II
Creator II

Expression

Hi,

I have attached sampale QV document with two pivot tables in it. IN my 2nd Pivot table I want to show no of Polcies if there is a negative figure in Profit Figure. I want to display following table

 

YEARcount
20152
20161
20171

but it actually shows only 2015 year. Can you pls help me

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

Use this for 2nd pivot table

Dimension

YEAR

expression

SUM(Aggr(IF(SUM(Premium)-SUM(CLAIM)<0,1,0),POLICY_NO,NAME,YEAR))

View solution in original post

2 Replies
MK_QSL
MVP
MVP

Use this for 2nd pivot table

Dimension

YEAR

expression

SUM(Aggr(IF(SUM(Premium)-SUM(CLAIM)<0,1,0),POLICY_NO,NAME,YEAR))

Anonymous
Not applicable

Hi ,

you could just tweek your expression a little

=sum(IF((Premium-CLAIM)<0,1,0))

Qlik 01.jpg