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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
kusha_2007
Contributor III
Contributor III

Aggregated function when used in Bar chart doesnt work properly when used inside a variable

Hello All , 

 

I have a bar chart with Dimension as MonthYear and my Measure  is sum(AGGR(Count (distinct InteractionCallDate), AccountPlanOwnerID,CountryCode,MonthYear)). When I store the above calculation in a variable and use the variable in the Chart , the result is not correct . it gives the total sum for all the months .

If  I Use the calculation directly in the chart , it behaves properly . 

I hope I am able to explain the issue correctly .  I am not able to figure why its not working properly when used inside a variable.

2 Solutions

Accepted Solutions
marcus_sommer

Make sure that your variable-content looked like:

sum(AGGR(Count (distinct InteractionCallDate), AccountPlanOwnerID,CountryCode,MonthYear))

and not

= sum(AGGR(Count (distinct InteractionCallDate), AccountPlanOwnerID,CountryCode,MonthYear))

The essential difference is the leading equal-sign.

- Marcus

View solution in original post

kusha_2007
Contributor III
Contributor III
Author

2 Replies
marcus_sommer

Make sure that your variable-content looked like:

sum(AGGR(Count (distinct InteractionCallDate), AccountPlanOwnerID,CountryCode,MonthYear))

and not

= sum(AGGR(Count (distinct InteractionCallDate), AccountPlanOwnerID,CountryCode,MonthYear))

The essential difference is the leading equal-sign.

- Marcus

kusha_2007
Contributor III
Contributor III
Author

Thanks a lot...