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

Variable value 0 after applying aggr its getting null in calcualted dim but in expression working .

Hi Expert,

i have created 2 different variable,

when apply claim wise aggr function it's getting null in calculated dimension but in expression value give.

for example if i am having claim wise 2 differnet figures of above two variable, but there is in first variable value is zero

and second variable is having some value so after applying aggr function over there claim wise. it's give me null values in calculated dimension but in expression this is working.

1st expression which is having 0 value -

aggr(sum({<[Link Flag]={'PAID'},[Claims Flag]={'TP'},[Link Date]={'<=$(vEndDate)>=$(vStartDateFY)'},[Link Month],[Link Quarter],[Link Year]>}[Gross Claim Paid Amount]),[Claim Number])

2nd expression which is having some values -

aggr(sum({<[No Claim Status]={'Repudiation','Closure','Withdrawn'},[Link Flag]={'NC'},[Claims Flag]={'TP'},[Link Date]={'<=$(vEndDate)>=$(vStartDateFY)'}>}[No Claim Expense Amount]),[Claim Number])


so when i add both expression (expr 1) + (expr 2) and show in calculated dimension its show null.


Kindly help thanx in advance.

1 Solution

Accepted Solutions
vishsaggi
Champion III
Champion III

‌if you want to use in calculated dimensions you have to use aggr() around the expression...

like = aggr(your expression, fieldname)

View solution in original post

4 Replies
olimonbi29
Contributor III
Contributor III

Try this apparently a coma is missing:

aggr(sum({<[Link Flag]={'PAID'},[Claims Flag]={'TP'},[Link Date]={'<=$(vEndDate)>=$(vStartDateFY)'},[Link Month],[Link Quarter],[Link Year]>},[Gross Claim Paid Amount]),[Claim Number])

2nd expression which is having some values -

aggr(sum({<[No Claim Status]={'Repudiation','Closure','Withdrawn'},[Link Flag]={'NC'},[Claims Flag]={'TP'},[Link Date]={'<=$(vEndDate)>=$(vStartDateFY)'}>},[No Claim Expense Amount]),[Claim Number])


vishsaggi
Champion III
Champion III

May be try this?

= Sum( aggr(sum({<[Link Flag]={'PAID'},[Claims Flag]={'TP'},[Link Date]={"<=$(vEndDate)>=$(vStartDateFY)"},[Link Month],[Link Quarter],[Link Year]>}[Gross Claim Paid Amount]),[Claim Number]))


= Sum( aggr(sum({<[No Claim Status]={'Repudiation','Closure','Withdrawn'},[Link Flag]={'NC'},[Claims Flag]={'TP'},

            [Link Date]={"<=$(vEndDate)>=$(vStartDateFY)"}>}[No Claim Expense Amount]),[Claim Number]))




Then use these expression to add. Use like RangeSum()


= RangeSum(FirstExprLabel, SecondExprLabel)

deepak_gupta
Partner - Contributor II
Partner - Contributor II
Author

Thanks for your response Nagaraju,

same problem your approach is working in Expression but not working in Calculated Dimension.

when applying rangemax in dimension it's show Error (error in calculated Dimension).

vishsaggi
Champion III
Champion III

‌if you want to use in calculated dimensions you have to use aggr() around the expression...

like = aggr(your expression, fieldname)