Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
siva0606
Contributor III
Contributor III

Drill down Dimension in Aggr expression

Hi All,

I am using the below expression for one of my calculation and using two fields in dimension.

1. Product is a field

2. Level is a drill down dimension.

=Sum(Aggr(((Sum({<Year={$(=Max(Year))}>}Sales)+$(vBudget))/Count(Distinct {$<Year={$(Max(Year))}>} Date))*6,Product,

$(='[' & GetCurrentField([Level]) & ']')))

Kindly correct me if the above expression is wrong.

Best Regards,

Siva

Labels (1)
1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You generally don't need to use GetCurrentField.  You can just specify the group name as an Aggr dim. ie

Product, Level

-Rob

View solution in original post

5 Replies
stevejoyce
Specialist II
Specialist II

Are you in View or Sense?  That would work in View.  GetCurrentField is not available in Sense.  You can use an if-statement to mimic the getcurrentfield logic, or i just learned the other day of using GetObjectDimension.  If your Level drill down dimension can't change order you can use this as you'll know the dimension index of it.

 

Otherwise you can reference this workaround with a variable:

https://community.qlik.com/t5/New-to-Qlik-Sense/GetCurrentField-in-Qlik-sense/td-p/909450

 

 

siva0606
Contributor III
Contributor III
Author

Hi ,

I am using Qlikview. But the above expression is not working as expected.

 

Best Regards,

Siva

Kushal_Chawda

@siva0606  I don't see any issue in your expression. Probably you can share sample data in expected output

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You generally don't need to use GetCurrentField.  You can just specify the group name as an Aggr dim. ie

Product, Level

-Rob

siva0606
Contributor III
Contributor III
Author

@rwunderlich Thank you so much.

Best Regards,

Siva