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

AGGR function and IF statement

below is an agg r function used in a chart.

sum(Aggr (If($v_RAGcolour) = 'R',1,0), store_id)) say output = 24.

0ur goal is to include another condition in the Aggr function.

Business_month = $v_last_month.

Hence our goal is to determine -

Sum of store_id where  

1> ($v_RAGcolour) = 'R',1,0

2> Business_month = $v_last_month.

 

  • How to resolve this issue.
Labels (1)
2 Replies
rubenmarin

Hi, can you try?: sum(Aggr (If($v_RAGcolour) = 'R' and Business_month = $v_last_month,1,0), store_id, Business_month)) 

oskartoivonen
Partner - Contributor III
Partner - Contributor III

This expression can probably be simplified by using Count(store_id) and filling in the correct set analysis.