Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

formula in variable on Variable Overview not working...

Dear All,

i have a formula which i have to used many places in my Qlikview application the formula is  : aggr((sum(TRADE_VALUE)/ count(DISTINCT TRADE_DATE))/10000000, MEMBER_NAME)

Now what i am thing that in Variable overview i had created a variable of above mention formula and want to use that variable to other places . but it is not working please help.

Is this because it is returning multiple records ??

2 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

aggr((sum(TRADE_VALUE)/ count(DISTINCT TRADE_DATE))/10000000, MEMBER_NAME)

If you don't use an aggregation function around this expression it would return a virtual table, possible with more than one row, i.e. more than one value. That's probably why it's not working in your case. Try using an aggregation function around it:

sum( aggr((sum(TRADE_VALUE)/ count(DISTINCT TRADE_DATE))/10000000, MEMBER_NAME) )


talk is cheap, supply exceeds demand
Not applicable
Author

HI Gysbert,

Thanks for you reply,

actually this formula i have to used in a Calculated Dimensional in many places so i want to make it as variable, and used it when needed in different different charts/tables.