Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
jblomqvist
Specialist
Specialist

How to use a Drill-Down Group in an AGGR expression for a chart?

Hi all,

How can I use a Drill Down Group in an Aggr Expression?

The Drill Down is called Time consisting of fields Year, Quarter, and Month.

E.g. I have a Bar Chart that uses Drill Down dimension and expression of Sum(LineSalesAmount).

I need to use it in an AGGR function now, how can I write it please?

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Something like this perhaps: aggr( ...expression..., $(='[' & GetCurrentField([GroupNameHere]) & ']'))


talk is cheap, supply exceeds demand

View solution in original post

5 Replies
Gysbert_Wassenaar

Something like this perhaps: aggr( ...expression..., $(='[' & GetCurrentField([GroupNameHere]) & ']'))


talk is cheap, supply exceeds demand
jblomqvist
Specialist
Specialist
Author

Perfect, you are a star Gysbert!

Anonymous
Not applicable

Thx Gysbert.

Just did a quick search on this forum, this thread popped up and was exactly the solution I was after.

carlcimino
Creator II
Creator II

Hi trying to implement this solution...  I want to replace DEPT_LVL5_DESC with a drill group called Dept Top 10.  I've tried copying and pasting  $(='[' & GetCurrentField([Dept Top 10]) & ']')) everywhere DEPT_LVL5_DESC was but it didn't work.  Any suggestions?  Thanks.

Drill GroupDrill Group

=if(
aggr(
rank(
($(v_BkdExp_CY_PTD)-$(v_BudgetExp_CY_PTD)),4,1),
[DEPT_LVL5_DESC])<=5,
[DEPT_LVL5_DESC]
,
if(
aggr(
rank(
-($(v_BkdExp_CY_PTD)-$(v_BudgetExp_CY_PTD)),4,1),
[DEPT_LVL5_DESC])<=5
,[DEPT_LVL5_DESC]))

carlcimino
Creator II
Creator II

No wonder it isn't working. Qlik Sense does not support GetCurrentField().  Boo!