Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
upaliwije
Creator II
Creator II

Calculated Dimension

Dear Friends

 

I have written below  calculated dimension in my pivot table of my Qv Doc

=if(aggr(sum({<CRE_PAID_AMOUNT={">=0"}>},RISK))=6,count(DISTINCT RISK),dual('6',1),
if(aggr(sum({<CRE_PAID_AMOUNT={">=0"}>},RISK))=10,count(DISTINCT RISK),dual('10',2)))

But it does not work. Pls correct me where I am wrong 

5 Replies
Vegar
MVP
MVP

You are missing to point out for which dimensions you want to aggregate your data. Aggr() takes more than one parameter. 

Aggr(expr, StructuredParameter{, StructuredParameter})

Aggr(sum({<CRE_PAID_AMOUNT={">=0"}>},RISK), #MISSING# )

 

Read more:https://help.qlik.com/sv-SE/sense/June2019/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/aggr.htm

upaliwije
Creator II
Creator II
Author

Thanks for your reply. But is is not clear to me

 

Vegar
MVP
MVP

You are trying to aggregate sum({<CRE_PAID_AMOUNT={">=0"}>},RISK)  but you are not stating over which dimension you want to aggregate. 

 

You could try to see if you really  need the aggr. Try

 

=if(sum({<CRE_PAID_AMOUNT={">=0"}>},RISK)=6,count(DISTINCT RISK),dual('6',1),
if(sum({<CRE_PAID_AMOUNT={">=0"}>},RISK)=10,count(DISTINCT RISK),dual('10',2)))

upaliwije
Creator II
Creator II
Author

It is not working my friend,Thanks for your help

.

Brett_Bleess
Former Employee
Former Employee

Have a look at the following Design Blog post:

https://community.qlik.com/t5/Qlik-Design-Blog/Use-Aggregation-Functions/ba-p/1475833

There are others on AGGR as well, here is the base link to where you can search on the others if the one above is not what you need.

https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.