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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
YOSHIDA_T
Partner - Contributor III
Partner - Contributor III

How to use 'Aggr()' right.

お疲れ様です。aggr()に関する質問です。

顧客ID、店舗ごとの最小の売上IDをD列に表示したくテーブルを作成し、

D1の数式を記載したところ、このようにnullが多い結果となりました。

本来は

・D列のすべてに値が表示される

・顧客ID、店舗毎の最小売上IDが表示される

想定ですが、そのどちらの要件も現状満たせておりません。

この問題の解決方法をご教示いただけると幸いです。

D列の関数のあらゆる箇所に{1}とtotalを入れてみてはいますが、特に効果はありませんでした。

YOSHIDA_T_0-1770170309074.png

 

1 Solution

Accepted Solutions
marcus_sommer

aggr(min(Field), Dim) isn't a measure else a calculated dimension - which returns distinct values. You may change the behaviour with: aggr(NODISTINCT min(Field), Dim) or wrapping it with an aggregation-function to get a measure again, like: avg(aggr(min(Field), Dim))

View solution in original post

2 Replies
marcus_sommer

aggr(min(Field), Dim) isn't a measure else a calculated dimension - which returns distinct values. You may change the behaviour with: aggr(NODISTINCT min(Field), Dim) or wrapping it with an aggregation-function to get a measure again, like: avg(aggr(min(Field), Dim))

YOSHIDA_T
Partner - Contributor III
Partner - Contributor III
Author

Hi Marcus.

Thank you for your answer.

[NODISTINCT]...  Looking back now, Why didn't I think of this?

Anyway, I solved this question.

I accept your best answer.

Thank you.